on master help sign in
full translated
83b3009Sergey Duck
doc/README-ru.md+55−70
@@ -448,74 +448,67 @@ export BAT_PAGER="less -RF"
448alias cat="bat --theme=\$(defaults read -globalDomain AppleInterfaceStyle &> /dev/null && echo default || echo GitHub)"
448alias cat="bat --theme=\$(defaults read -globalDomain AppleInterfaceStyle &> /dev/null && echo default || echo GitHub)"
449```
449```
450
450
451−## Configuration file
451+## Файл конфигурации
452
452
453−`bat` can also be customized with a configuration file. The location of the file is dependent
453+`bat` так-же может быть кастомизирован с помощью файла конфигурации. Его местоположение зависит от вашей ОС, чтобы посмотреть его путь, введите
454−on your operating system. To get the default path for your system, call
455```
454```
456bat --config-file
455bat --config-file
457```
456```
458
457
459−Alternatively, you can use the `BAT_CONFIG_PATH` environment variable to point `bat` to a
458+Так-же вы можете установить переменную окружения `BAT_CONFIG_PATH` чтобы изменить путь к файлу конфигурации.
460−non-default location of the configuration file:
461```bash
459```bash
462export BAT_CONFIG_PATH="/path/to/bat.conf"
460export BAT_CONFIG_PATH="/path/to/bat.conf"
463```
461```
464
462
465−A default configuration file can be created with the `--generate-config-file` option.
463+Файл конфигурации по-умолчанию может быть создан с помощью флага `--generate-config-file`.
466```bash
464```bash
467bat --generate-config-file
465bat --generate-config-file
468```
466```
469
467
470−### Format
468+### Формат
471
469
472−The configuration file is a simple list of command line arguments. Use `bat --help` to see a full list of possible options and values. In addition, you can add comments by prepending a line with the `#` character.
470+Файл конфигурации - это всего лишь набор аргументов. Введите `bat --help` чтобы просмотреть список всех возможных флагов и аргументов. Так-же, вы можете заккоментировать строчку с помощью `#`.
473
471
474−Example configuration file:
472+Пример файла конфигурации:
475```bash
473```bash
476−# Set the theme to "TwoDark"
474+# Устанавливает тему "TwoDark"
477--theme="TwoDark"
475--theme="TwoDark"
478
476
479−# Show line numbers, Git modifications and file header (but no grid)
477+# Показывает количество строк, изменений в Git и заголовок файла
480--style="numbers,changes,header"
478--style="numbers,changes,header"
481
479
482−# Use italic text on the terminal (not supported on all terminals)
480+# Использует наклонный текст (не все терминалы поддерживаеются)
483--italic-text=always
481--italic-text=always
484
482
485−# Use C++ syntax for .ino files
483+# Использует синтаксис C++ для всех .ino файлов
486--map-syntax "*.ino:C++"
484--map-syntax "*.ino:C++"
487
485
488−# Use ".gitignore"-style highlighting for ".ignore" files
486+# Использует синтаксик Git Ignore для всех файлов .ignore
489--map-syntax ".ignore:Git Ignore"
487--map-syntax ".ignore:Git Ignore"
490```
488```
491
489
492−## Using `bat` on Windows
490+## Использование `bat` в Windows
493
491
494−`bat` mostly works out-of-the-box on Windows, but a few features may need extra configuration.
492+`bat` в основном работает полностью из коробки, но несколько возможностей нуждаются в настройке.
495
493
496−### Paging
494+### Пейджинг
497
495
498−Windows only includes a very limited pager in the form of `more`. You can download a Windows binary
496+Windows поддерживает только очень простой пейджер `more`. Вы можете скачать установщик для `less` [с его сайта](http://www.greenwoodsoftware.com/less/download.html) или [через Chocolatey](https://chocolatey.org/packages/Less). Чтобы его использовать, скопируйте исполняемый файл в ваш `PATH` или [используйте переменную окружения](#using-a-different-pager). [Пакет из Chocolatey](#on-windows) установит все автоматически.
499−for `less` [from its homepage](http://www.greenwoodsoftware.com/less/download.html) or [through
500−Chocolatey](https://chocolatey.org/packages/Less). To use it, place the binary in a directory in
501−your `PATH` or [define an environment variable](#using-a-different-pager). The [Chocolatey package](#on-windows) installs `less` automatically.
502
497
503−### Colors
498+### Цвета
504
499
505−Windows 10 natively supports colors in both `conhost.exe` (Command Prompt) and PowerShell since
500+Windows 10 поддерживает цвета и в`conhost.exe` (Command Prompt) и в PowerShell начиная с версии Windows
506−[v1511](https://en.wikipedia.org/wiki/Windows_10_version_history#Version_1511_(November_Update)), as
501+[v1511](https://ru.wikipedia.org/wiki/Windows_10#Обновления и поддержка), так-же как и в bash. На ранних версиях Windows, вы можете использовать
507−well as in newer versions of bash. On earlier versions of Windows, you can use
508−[Cmder](http://cmder.net/), which includes [ConEmu](https://conemu.github.io/).
502+[Cmder](http://cmder.net/), в котором есть [ConEmu](https://conemu.github.io/).
509
503
510−**Note:** The Git and MSYS versions of `less` do not correctly interpret colors on Windows. If you
504+**Внимание:** Версия `less` в Git и MSYS2 воспроизводит цвета неккоректно. Если у вас нет других пейджеров, мы можете отключить испольщование пейджеров с помощью флага `--paging=never`
511−don’t have any other pagers installed, you can disable paging entirely by passing `--paging=never`
505+или установить `BAT_PAGER` равным пустой строке.
512−or by setting `BAT_PAGER` to an empty string.
513
506
514### Cygwin
507### Cygwin
515
508
516−`bat` on Windows does not natively support Cygwin's unix-style paths (`/cygdrive/*`). When passed an absolute cygwin path as an argument, `bat` will encounter the following error: `The system cannot find the path specified. (os error 3)`
509+`bat` не поддерижвает нативно пути в стиле Unix (`/cygdrive/*`). Когда указан абсолютный путь cygwin, `bat` выдаст следующую ошибку: `The system cannot find the path specified. (os error 3)`
517
510
518−This can be solved by creating a wrapper or adding the following function to your `.bash_profile` file:
511+Она может быть решена, добавлением следующей функции в `.bash_profile`:
519
512
520```bash
513```bash
521bat() {
514bat() {
@@ -531,78 +524,70 @@ bat() {
531}
524}
532```
525```
533
526
534−## Troubleshooting
527+## Проблемы и их решение
535
528
536−### Terminals & colors
529+### Терминалы и цвета
537
530
538−`bat` handles terminals *with* and *without* truecolor support. However, the colors in the syntax
531+`bat` поддерживает терминалы *с* и *без* поддержки truecolor. Однако,цвета в выделении синтаксиса не оптимизированы к 8-ми битным цветам и рекоментуется использовать терминалы с поддержкой 24-ых битных цветов (`terminator`, `konsole`, `iTerm2`, ...).
539−highlighting themes are not optimized for 8-bit colors and it is therefore strongly recommended
532+Смотрите [эту статью](https://gist.github.com/XVilka/8346728) для полного списка терминалов.
540−that you use a terminal with 24-bit truecolor support (`terminator`, `konsole`, `iTerm2`, ...).
541−See [this article](https://gist.github.com/XVilka/8346728) for more details and a full list of
542−terminals with truecolor support.
543
533
544−Make sure that your truecolor terminal sets the `COLORTERM` variable to either `truecolor` or
534+Удостовертесь, что переменная `COLORTERM` равна`truecolor` или
545−`24bit`. Otherwise, `bat` will not be able to determine whether or not 24-bit escape sequences
535+`24bit`. Иначе, `bat` не сможет определить поддержку 24 битных цветов(и будет использовать 8 битные).
546−are supported (and fall back to 8-bit colors).
547
536
548−### Line numbers and grid are hardly visible
537+### Текст и номера строк плохо видны
549
538
550−Please try a different theme (see `bat --list-themes` for a list). The `OneHalfDark` and
539+Используйте другую тему (смотрите `bat --list-themes` чтобы увидеть все тмы). Темы `OneHalfDark` и
551−`OneHalfLight` themes provide grid and line colors that are brighter.
540+`OneHalfLight` имеют более яркие номера строк и тексты.
552
541
553−### File encodings
542+### Кодировки файлов
554
543
555−`bat` natively supports UTF-8 as well as UTF-16. For every other file encoding, you may need to
544+`bat` поддерживает UTF-8 и UTF-16. Для другой кодировки, вам возможно будет нужно перекодировать их, так как кодировка может быть распознана не верно. Используйте `iconv`.
556−convert to UTF-8 first because the encodings can typically not be auto-detected. You can `iconv`
545+Пример: у вас есть PHP файл в кодировке Latin-1 (ISO-8859-1):
557−to do so.
558−Example: if you have a PHP file in Latin-1 (ISO-8859-1) encoding, you can call:
559``` bash
546``` bash
560iconv -f ISO-8859-1 -t UTF-8 my-file.php | bat
547iconv -f ISO-8859-1 -t UTF-8 my-file.php | bat
561```
548```
562−Note: you might have to use the `-l`/`--language` option if the syntax can not be auto-detected
549+Внимание: вам может понадобится флаг `-l`/`--language` если синтаксис не смог быть авто-определен `bat`.
563−by `bat`.
564
550
565−## Development
551+## Разработка
566
552
567```bash
553```bash
568−# Recursive clone to retrieve all submodules
554+# Рекурсивно клонирует все модули
569git clone --recursive https://github.com/sharkdp/bat
555git clone --recursive https://github.com/sharkdp/bat
570
556
571−# Build (debug version)
557+# Компиляции в режиме разработки
572cd bat
558cd bat
573cargo build --bins
559cargo build --bins
574
560
575−# Run unit tests and integration tests
561+# Запуск тестов
576cargo test
562cargo test
577
563
578−# Install (release version)
564+# Установка (релизная версия)
579cargo install --locked
565cargo install --locked
580
566
581−# Build a bat binary with modified syntaxes and themes
567+#Компилирование исполняего файла bat с другим синтаксисом и темами
582bash assets/create.sh
568bash assets/create.sh
583cargo install --locked --force
569cargo install --locked --force
584```
570```
585
571
586−## Maintainers
572+## Разработчики
587
573
588- [sharkdp](https://github.com/sharkdp)
574- [sharkdp](https://github.com/sharkdp)
589- [eth-p](https://github.com/eth-p)
575- [eth-p](https://github.com/eth-p)
590
576
591−## Project goals and alternatives
577+## Цели и альтернативы проекта
592
578
593−`bat` tries to achieve the following goals:
579+`bat` старается добится:
594
580
595−- Provide beautiful, advanced syntax highlighting
581+- Красивый, продвинутый синтаксис.
596−- Integrate with Git to show file modifications
582+- Интеграция с Git
597−- Be a drop-in replacement for (POSIX) `cat`
583+- Быть заменой `cat`
598−- Offer a user-friendly command-line interface
584+- Предлагать дружелюбный интерфейс и аргументы.
599
585
600−There are a lot of alternatives, if you are looking for similar programs. See
586+Есть очень много альтернатив `bat`. Смотрите [этот документ](doc/alternatives.md) для сравнения.
601−[this document](doc/alternatives.md) for a comparison.
602
587
603−## License
588+## Лицензия
604−Copyright (c) 2018-2020 [bat-developers](https://github.com/sharkdp/bat).
589+Copyright (c) 2018-2020 [Разработчики bat](https://github.com/sharkdp/bat).
605
590
606−`bat` is distributed under the terms of both the MIT License and the Apache License 2.0.
591+`bat` распостраняется под лицензями MIT License и Apache License 2.0.
607
592
608−See the [LICENSE-APACHE](LICENSE-APACHE) and [LICENSE-MIT](LICENSE-MIT) files for license details.
593+Смотрите [LICENSE-APACHE](LICENSE-APACHE) и [LICENSE-MIT](LICENSE-MIT) для более подробного ознакомления.