Перевод этой страницы еще не завершен. Пока это не произойдет, незавершенные части будут на английском.
Index
Windows and tabs
Settings
Colors
Keyboard shortcuts
Hints for working with the Terminal
Bash customization

terminal-icon_64.pngТерминал (Terminal)

Расположение в Deskbar:Приложения (Applications)
Расположение в Tracker:/boot/system/apps/Terminal
Настройки хранятся по адресу:~/config/settings/Terminal
~/config/settings/profile - дополняет/переопределяет параметры указанные в /boot/system/etc/profile
~/config/settings/inputrc - дополняет/переопределяет параметры указанные в /boot/system/etc/inputrc


Терминал - это интерфейс Haiku к командной оболочке bash (Bourne Again Shell)

Пожалуйста обратитесь к теме Bash и скрипты для просмотра ссылок на онлайн уроки по работе с командной оболочкой shell, а также обратитесь к теме Haiku-приложения для командной строки. Здесь же мы сконцентрируемся непосредственно на приложении Терминал (Terminal).

index Окна и вкладки

Вы можете открыть столько Терминалов, сколько вам необходимо, каждый в своем собственном окне, просто запуская новые Терминалы, либо нажимая ALT+N в уже работающем Терминале. Также можно использовать вкладки в Терминале, открывая их комбинацией ALT+T.

terminal.png

Double-clicking into the emtpy part of the tab bar opens a new tab; onto a tab opens a dialog to rename its title. There are several %-designated variables that are explained with a tooltip when you hover the mouse over the text field.
By default, %1d: %p, a tab shows the current directory and, separated by a :, the name of the currently running process (or -- if it's just bash running, probably idling). The screenshot above shows the first tab with a FTP session in the Desktop folder and a second tab idling at home.
Via Settings | Window title… the Terminal window's title can be edited in a similar way.

Правый щелчок мыши по вкладке вызывает контекстное меню, которое содержит следующие пункты: Закрыть вкладку, Закрыть остальные вкладки, Переименовать вкладку.

У окна Терминала изменяется размер, как и у любого другого приложения, а также имеется возможность использовать предустановленные размеры окна, выберите в меню Настройки пункт Размер окна. Сочетание клавиш ALT+ENTER включает полноэкранный режим.

All the settings you change directly through the Settings menu, like Window title, Window size, Text encoding or Font size are only kept for the current session. If you want to make permanent changes, you have to either invoke Save as default or apply them in the Settings… panel.

index Настройки

Выбрав в меню Настройки пункт Настройки... откроется окно настроек Терминала.

terminal-settings.png

Most of the offered settings speak for themselves. Not entirely obvious though, the font size is set in the submenu of the Font popup menu.
Hover your mouse over the "formulas" for naming tab and window titles to get tooltips for the available variables.

A few more options follow: you can have a Blinking cursor and choose to Allow bold text.
Use left Option as Meta key if you work with certain UNIX software that relies on accessing an extended portion of the ASCII character set, like e.g. GNU Emacs and the GNU readline library.
Activate the checkbox to Confirm exit if active programs exist and you'll be warned when trying to close a Terminal window while an app is still being executed.

Save to file… let's you save different settings as separate profiles, which on double-click open an accordingly configured Terminal.
Revert brings back the settings that were active when you opened the settings panel.
Defaults resets everything to default values.

index Colors

Settings | Colors… opens a panel to configure the colors used by Terminal.

terminal-colors.png

From the top menu, you can choose a pre-defined Color scheme like Midnight or Retro or create a Custom one by selecting the color you want to change (Text, Background, Cursor etc.) and then use the color picker below.

You can also configure "ANSI colors", which are the first 8 named colors in the color palette of terminal applications. You choose a color, for example "ANSI red color", and then adjust it with the color picker below. The effect is visible live in the open Terminal and in the preview below. The exact colors used in various places are documented at Wikipedia.

Save to file… let's you save your custom color scheme under a name that will appear in the Color scheme menu at the top, if you put it in the default location ~/config/settings/Terminal/Theme.
Revert brings back the colors that were active when you opened the colors panel.
Defaults resets everything to default values.

index Горячие клавиши

Список полезных сочетаний клавиш вы можете найти в данной теме.

Another nice feature that is more a key & mouse combination: When holding ALT a path or URL under the mouse pointer gets highlighted. A left-click opens the file/folder or website. A right-click opens a context menu to either Copy path or Copy absolute path. Imagine you're in /MyData/source/haiku/ and have the path generated/objects/haiku/x86_gcc2/release/apps/stylededit/StyledEdit under the mouse pointer, the latter menu item will result in the combined, absolute path <deep breath>:
/MyData/source/haiku/generated/objects/haiku/x86_gcc2/release/apps/stylededit/StyledEdit.

If you hold down ALT SHIFT, only the path from beginning to where your mouse pointer sits will be highlighted.

By the way, right-clicking into the Terminal window will insert the clipboard. In combination with copying parts of highlighted paths, this can be used for speedy navigation of deep folder hierarchies.

index Подсказки для работы с Терминалом

index Настройка командной оболочки Bash

Пришедшая из Unix, командная оболочка Bash имеет очень широкие возможности по настройке. Существуют два наиболее важных для пользователя файла: profile и inputrc
Оба файла могут быть созданы в домашней папке (/boot/home/config/settings/), где они дополняют или переопределяют (т. к. являются более приоритетными) системные настройки по умолчанию, расположенные по адресу /boot/common/etc/.

profile

profile загружается каждый раз, когда вы открываете новый Терминал. Этот файл устанавливает все виды псевдонимов и переменных, которые затрагивают поведение командной оболочки и её внешнего вида. Существует множество онлайн ресурсов, на которых детально описаны все эти возможности.

На сервере Haiku/BeOS Tips имеется довольно много подсказок для начала изучения настроек Bash, например:

There are more, have a look.

inputrc

inputrc работает с клавиатурными привязками (keybindings). Так как в Haiku эти настройки вполне пригодны и по умолчанию, то скорее всего менять их не потребуется, но если всё же возникла небходимость их подправить, то рекомендуется обратится к одному из многочисленных онлайн ресурсов, например, The GNU Readline Library.