La traduction de cette page n'est pas achevée. Les parties non encore traduites apparaîtrons en anglais.
Index
Windows and tabs
Settings
Colors
Keyboard shortcuts
Hints for working with the Terminal
Bash customization

terminal-icon_64.pngTerminal

Deskbar:Applications
Location:/boot/system/apps/Terminal
Settings:~/config/settings/Terminal
~/config/settings/profile - ajoute/surcharge les paramètres par défaut définis dans /boot/system/settings/etc/profile.
~/config/settings/inputrc - ajoute/surcharge les paramètres par défaut définis dans /boot/system/settings/etc/inputrc.


Le Terminal est l'interface de Haiku à bash, le Bourne Again Shell.

Veuillez vous référer à la rubrique sur les Scripts, vous y trouverez quelques liens vers des tutoriels en ligne concernant le travail dans le shell, Jetez aussi un œil aux programmes en ligne de commande spécifiques à Haiku. Ici, nous traiterons seulement de l'application Terminal.

index Fenêtres et onglets

Vous pouvez ouvrir autant de Terminaux que vous voulez, chacun dans sa fenêtre propre, en lançant plusieurs fois l’application Terminal ou en tapant Alt N depuis un Terminal ouvert. Vous pouvez également utiliser la vue en onglets du Terminal : utilisez la combinaison Alt T pour ouvrir un nouvel onglet.

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.

Right-clicking a tab shows a context menu to Close tab, Close other tabs or, like double-clicking, Edit tab title.... Un clic droit sur un onglet affiche un menu contextuel pour fermer cet onglet (Close tab), fermer les autres onglets (Close other tabs) ou, comme un double-clic, éditer le titre de l'onglet (Edit tab title...).

Une fenêtre du Terminal peut être redimensionnée comme toute autre fenêtre ou en utilisant le menu Settings | Window Size. Alt Entrée permet de basculer en mode plein écran.

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 Réglages

Settings | Settings... ouvre un panneau pour configurer les réglages standards du 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… permet d'enregistrer différents réglages sous des profils distincts, que vous pouvez ouvrir en double-cliquant dessus pour ouvrir un terminal ainsi configuré.
Revert restaure les réglages qui étaient actifs quand vous avez ouvert le panneau de réglage.
Defaults réinitialise toutes les réglages.

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 réinitialise toutes les réglages.

index Raccourcis claviers

Vous trouverez une liste des raccourcis utiles dans Raccourcis clavier.

Une autre fonction intéressante est une combinaison de touche et du curseur. En maintenant Altun chemin ou une URL sous le curseur est mis en évidence. Un clique gauche ouvre le fichier/ dossier ou site correspondant. Un clique droit ouvre un menu contextuel pour Copier le chemin ou bien Copier le chemin absolu (absolute path). Par exemple, si vous vous trouvez dans /MyData/source/haiku/ et que vous avez le chemin generated/objects/haiku/x86_gcc2/release/apps/stylededit/StyledEdit sous le curseur de la souris, vous obtiendrez le chemin absolu <Prenez un grand souffle>:
/MyData/source/haiku/generated/objects/haiku/x86_gcc2/release/apps/stylededit/StyledEdit.

Si vous maintenez enfoncé les touches Alt Maj, seul la partie allant du début du chemin jusqu'au pointeur de la souris sera mis en surbrillance.

De plus, un clique droit dans le Terminal insère le contenu du presse-papier. Combiné avec l'utilisation de la mise en surbrillance des chemins, cela permet une navigation rapide dans une arborescence de dossier.

index Conseils pour travailler dans le Terminal

index Personnalisation du Bash

Issu du monde Unix, les possibilités de personnalisation du shell bash sont infinies. Deux fichiers sont particulièrement importants pour l'utilisateur : profile et inputrc
Ces deux fichiers peuvent être créés dans votre dossier /boot/home/config/settings/ pour se substituer aux valeurs par défaut du système qui sont configurées dans /boot/system/etc/.

profile

Le fichier profile est chargé chaque fois que vous ouvrez un nouveau Terminal. Il configure divers alias et variables qui affectent le comportement et l’apparence de bash. Vous trouverez en ligne de nombreuses ressources qui détaillent les possibilités de configuration.

« The Haiku/BeOS Tip Server » met à votre disposition quelques astuces pour vous aider à démarrer, comme :

There are more, have a look.

inputrc

Le fichier inputrc permet de configurer des équivalents claviers. Haiku fournit déjà des valeurs par défaut, vous n’aurez donc probablement pas à vous occupez de ces réglages plus compliqués. Si vous avez des besoins spécifiques, consultez des ressources en ligne, comme The GNU Readline Library.