A tradução desta página ainda não está completa. Até lá, partes incompletas mostrarão o original em inglês.
Index
Windows and tabs
Settings
Colors
Keyboard shortcuts
Hints for working with the Terminal
Bash customization

terminal-icon_64.pngTerminal

Deskbar:Aplicativos
Localização:/boot/system/apps/Terminal
Definições:~/config/settings/Terminal
~/config/settings/profile - acrescenta/substitui os padrões em /boot/system/settings/etc/profile
~/config/settings/inputrc - acrescenta/substitui os padrões em /boot/system/settings/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

Pode-se abrir quantos Terminais forem necessários, também cada um em sua própria janela simplesmente carregando mais Terminais ou com ALT N a partir de um Terminal já aberto. Ou utilizar a visão em guias do Terminal e abrir mais guias com 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.

Clicar com o botão direito do mouse em uma guia exibe um menu de contexto para Fechar guia, Fechar outras guias ou, como o duplo clique, Editar título da guia....

Uma janela do Terminal pode ser redimensionada como qualquer outra janela ou usando as predefinições a partir do menu Definções | Tamanho da janela. ALT ENTER alterna para o modo de tela cheia.

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 Configurações

Definições | Definições... abre uma janela de diálogo para configurar as definições padrão de um Terminal.

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 Atalhos de teclado

Você encontrará uma lista de atalhos úteis em Atalhos e combinações de teclas.

Outra funcionalidade bacana que é mais uma combinação mouse & teclado: Ao apertar ALT um caminho ou URL abaixo do ponteiro do mouse fica destacado. Um clique com o botão esquerdo abre o arquivo/pasta ou sítio da web. Um clique com o botão direito abre um menu de contexto para Copiar caminho ou Copiar caminho absoluto. Imagine que esteja em /MyData/source/haiku/ e tenha o caminho generated/objects/haiku/x86_gcc2/release/apps/stylededit/StyledEdit sob o ponteiro do mouse, o último item do menu resultará no caminho absoluto, combinado <suspiro profundo>:
/MyData/source/haiku/generated/objects/haiku/x86_gcc2/release/apps/stylededit/StyledEdit.

Se apertar ALT SHIFT, apenas o caminho do começo até onde o ponteiro do seu mouse está será destacado.

A propósito, um clique com o botão direito do mouse dentro da janela do Terminal inserirá o conteúdo da área de transferência. Em combinação com partes copiadas de caminhos destacados, isto pode ser utilizado para nevagação rápida em hierarquias compridas de pastas.

index Dicas para trabalhar com o Terminal

index Personalização do Bash

Vindo do Unix, existem incontáveis possibilidades para personalizar o próprio bash. Existem dois arquivos que são especialmente importantes para o usuário: profile e inputrc.
Ambos podem ser criados na pasta /boot/home/config/settings/ e adicionar ou sobrepor os padrões do sistema que são definidos em /boot/system/settings/etc/.

profile

O profile é carregado toda vez que se abre um novo Terminal. Ele define todos os tipos de apelidos e variáveis que afetarão o comportamento e a aparência do bash. Você encontrará muitos recursos online que detalharão todas as possibilidades.

O Haiku/BeOS Tip Server tem algumas dicas para que possa começar, por exemplo:

There are more, have a look.

inputrc

O inputrc mexe com combinação de teclas. Uma vez que o Haiku proporciona padrões úteis, provavelmente não precisa se atrapalhar com estas definições mais complicadas. Se possui necessidades especiais aqui, consulte um dos muitos recursos online, por exemplo The GNU Readline Library.