A tradução desta página ainda não está completa. Até lá, partes incompletas mostrarão o original em inglês.

terminal-icon_64.pngTerminal

Deskbar:Aplicativos
Localização:/boot/system/apps/Terminal
Configurações:~/config/settings/Terminal
~/.profile - acrescenta/substitui os defaults em /boot/common/etc/profile
~/.inputrc - acrescenta/substitui os defaults em /boot/common/etc/inputrc


O Terminal é a interface do Haiku para o bash, o Bourne Again Shell.

Por favor tome como referência o tópico sobre Scripting para encontrar alguns links para tutoriais online sobre como trabalhar no shell e também faça uma leitura no tópico Aplicativos em linha de comando. Aqui, iremos nos concentar no aplicativo Terminal por si só.

index Janelas e abas

You can open as many Terminals as needed, either each in it's own window by simply launching more Terminals or with ALT N from an already running Terminal. Or you use Terminal's tabbed view and open more tabs with 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 Edit | Window title... the Terminal window's title can be edited in a similar way.

Right-clicking a tab shows a context menu to Close tab, Close other tabs or, like double-clicking, Edit tab title....

A Terminal window can be resized like any other window or you use the presets from the Settings | Window size menu. ALT ENTER toggles fullscreen mode.

Changed window size and text encoding are only kept choosing Settings | Save as default.

index Configurações

Settings | Settings... opens a panel to configure the standard settings of a Terminal.

terminal-settings.png

It starts off with the "formulas" for naming tab and window titles. Again, tooltips show the available variables. Below that you set font type, font size and the different text and background colors. You can choose a pre-defined color schema like Black on white or White on black or create a Custom one using the color picker below.
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.
You can save different settings as separate profiles, which on double-click open an accordingly configured Terminal.
Pressing OK will save the current settings as default.

index Keyboard shortcuts

You'll find a list of useful shortcuts in Shortcuts and key combinations.

index Bash customization

Coming from Unix, there are countless possibilities to customize the bash itself. There are two files that are especially important to the user: .profile and .inputrc
Both files can be created in the home/ folder and add or override the system defaults that are defined in /boot/common/etc/.

.profile

The .profile is loaded every time you open a new Terminal. It sets all kinds of aliases and variables that will affect bash's behavior and appearance. You'll find many online resources that will detail all possibilities.

The Haiku/BeOS Tip Server has quite a few tips to get you started, for example:

There are more, have a look.

.inputrc

The .inputrc deals with keybindings. Since Haiku provides useful defaults, you probably don't have to mess with these more involved settings. If you do have special needs here, consult one of the many online resources, e.g. The GNU Readline Library.

index Hints for working with the Terminal