c18f9eb4ea
Change-Id: I9b30ae27658a40b85c67a4c30aaea2b4bf9507f9
164 lines
13 KiB
HTML
164 lines
13 KiB
HTML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml" lang="ca" xml:lang="ca">
|
|
<head>
|
|
<!--
|
|
*
|
|
* Copyright 2008-2020, Haiku. All rights reserved.
|
|
* Distributed under the terms of the MIT License.
|
|
*
|
|
* Authors:
|
|
* Humdinger <humdingerb@gmail.com>
|
|
* Translators:
|
|
* Paco Rivière
|
|
*
|
|
-->
|
|
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
|
<meta http-equiv="Content-Style-Type" content="text/css" />
|
|
<meta name="robots" content="all" />
|
|
<title>Terminal</title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<link rel="stylesheet" type="text/css" href="../../Haiku-doc.css" />
|
|
</head>
|
|
<body>
|
|
|
|
<div id="banner">
|
|
<div><span>Manual d'usuari</span></div>
|
|
</div>
|
|
|
|
<div class="nav">
|
|
<div class="inner">
|
|
<ul class="lang-menu">
|
|
<li class="now">Català <span class="dropdown-caret">▼</span></li>
|
|
<li><a href="../../id/applications/terminal.html">Bahasa Indonesia</a></li>
|
|
<li><a href="../../de/applications/terminal.html">Deutsch</a></li>
|
|
<li><a href="../../en/applications/terminal.html">English</a></li>
|
|
<li><a href="../../es/applications/terminal.html">Español</a></li>
|
|
<li><a href="../../eo/applications/terminal.html">Esperanto</a></li>
|
|
<li><a href="../../fr/applications/terminal.html">Français</a></li>
|
|
<li><a href="../../fur/applications/terminal.html">Furlan</a></li>
|
|
<li><a href="../../it/applications/terminal.html">Italiano</a></li>
|
|
<li><a href="../../hu/applications/terminal.html">Magyar</a></li>
|
|
<li><a href="../../pl/applications/terminal.html">Polski</a></li>
|
|
<li><a href="../../pt_PT/applications/terminal.html">Português</a></li>
|
|
<li><a href="../../pt_BR/applications/terminal.html">Português (Brazil)</a></li>
|
|
<li><a href="../../ro/applications/terminal.html">Română</a></li>
|
|
<li><a href="../../sk/applications/terminal.html">Slovenčina</a></li>
|
|
<li><a href="../../fi/applications/terminal.html">Suomi</a></li>
|
|
<li><a href="../../sv_SE/applications/terminal.html">Svenska</a></li>
|
|
<li><a href="../../tr/applications/terminal.html">Türkçe</a></li>
|
|
<li><a href="../../zh_CN/applications/terminal.html"> 中文 [中文]</a></li>
|
|
<li><a href="../../ru/applications/terminal.html">Русский</a></li>
|
|
<li><a href="../../uk/applications/terminal.html">Українська</a></li>
|
|
<li><a href="../../jp/applications/terminal.html">日本語</a></li>
|
|
</ul>
|
|
<span>
|
|
« <a href="stylededit.html">StyledEdit</a>
|
|
:: <a href="../applications.html#list-of-apps" class="uplink">Aplicacions</a>
|
|
:: <a href="textsearch.html">TextSearch</a> »
|
|
</span></div>
|
|
</div>
|
|
|
|
<div id="content">
|
|
<div>
|
|
<div class="box-info">La traducció d'aquesta pàgina encara no està acabada. Fins que ho sigui, algunes part correspondrà a la versió anglesa.</div>
|
|
|
|
<h2><img src="../../images/apps-images/terminal-icon_64.png" alt="terminal-icon_64.png" width="64" height="64" />Terminal</h2>
|
|
<table summary="layout" border="0" cellspacing="0" cellpadding="2">
|
|
<tr><td>Barra d'eines:</td><td style="width:15px;"></td><td><span class="menu">Aplicacions</span></td></tr>
|
|
<tr><td>Ubicació:</td><td></td><td><span class="path">/boot/system/apps/Terminal</span></td></tr>
|
|
<tr><td>Preferències:</td><td></td><td><span class="path">~/config/settings/Terminal</span><br />
|
|
<span class="path">~/config/settings/profile</span> - adds/overrides defaults in <span class="path">/boot/system/settings/etc/profile</span><br />
|
|
<span class="path">~/config/settings/inputrc</span> - adds/overrides defaults in <span class="path">/boot/system/settings/etc/inputrc</span></td></tr>
|
|
</table>
|
|
<p><br /></p>
|
|
<p>The Terminal is Haiku's interface to bash, the Bourne Again Shell.</p>
|
|
<p>Please refer to the topic on <a href="../bash-scripting.html">Scripting</a> for a few links to online tutorials on working in the shell and also have a look at <a href="cli-apps.html">Haiku's commandline applications</a>. Here, we'll concentrate on the Terminal application itself.</p>
|
|
|
|
<h2>
|
|
<a href="#"><img src="../../images/up.png" style="border:none;float:right" alt="index" /></a>
|
|
<a id="windows-tabs" name="windows-tabs">Finestres i pestanyes</a></h2>
|
|
<p>You can open as many Terminals as needed, either each in its own window by simply launching more Terminals or with <span class="key">ALT</span> <span class="key">N</span> from an already running Terminal. Or you use Terminal's tabbed view and open more tabs with <span class="key">ALT</span> <span class="key">T</span>.</p>
|
|
<img src="../images/apps-images/terminal.png" alt="terminal.png" />
|
|
<br />
|
|
<p>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.<br />
|
|
By default, <tt>%1d: %p</tt>, a tab shows the current directory and, separated by a <tt>:</tt>, the name of the currently running process (or <tt>--</tt> if it's just bash running, probably idling). The screenshot above shows the first tab with a FTP session in the <span class="path">Desktop</span> folder and a second tab idling at <span class="path">home</span>.<br />
|
|
Via <span class="menu">Settings | Window title...</span> the Terminal window's title can be edited in a similar way.</p>
|
|
<p>Right-clicking a tab shows a context menu to <span class="menu">Close tab</span>, <span class="menu">Close other tabs</span> or, like double-clicking, <span class="menu">Edit tab title...</span>.</p>
|
|
<p>A Terminal window can be resized like any other window or you use the presets from the <span class="menu">Settings | Window size</span> menu. <span class="key">ALT</span> <span class="key">ENTER</span> toggles fullscreen mode.</p>
|
|
<p>All the settings you change directly through the <span class="menu">Settings</span> menu, like <span class="menu">Window title</span>, <span class="menu">Window size</span>, <span class="menu">Text encoding</span> or <span class="menu">Font size</span> are only kept for the current session. If you want to make permanent changes, you have to apply them in the <span class="menu">Settings...</span> panel.</p>
|
|
|
|
<h2><a href="#"><img src="../../images/up.png" style="border:none;float:right" alt="index" /></a>
|
|
<a id="settings" name="settings">Preferències</a></h2>
|
|
<p><span class="menu">Settings | Settings...</span> opens a panel to configure the standard settings of a Terminal.</p>
|
|
<img src="../images/apps-images/terminal-settings.png" alt="terminal-settings.png" />
|
|
<br />
|
|
<p>Most of the offered settings speak for themselves. Not entirely obvious though, the font size is set in the submenu of the <span class="menu">Font</span> popup menu.<br />
|
|
Hover your mouse over the "formulas" for naming tab and window titles to get tooltips for the available variables. <br />
|
|
You can choose pre-defined color schema like <span class="menu">Midnight</span> or <span class="menu">Retro</span> or create a <span class="menu">Custom</span> one by selecting which color you want to change (<span class="menu">Text</span>, <span class="menu">Background</span>, <span class="menu">Cursor</span> etc.) and then use the color picker below.</p>
|
|
<p>A few more options follow: you can have a <span class="menu">Blinking cursor</span> and choose to <span class="menu">Allow bold text</span>.<br />
|
|
<span class="menu">Use left Option as Meta key</span> 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.<br />
|
|
Activate the checkbox to <span class="menu">Confirm exit if active programs exist</span> and you'll be warned when trying to close a Terminal window while an app is still being executed.</p>
|
|
<table summary="layout" border="0" cellpadding="2" cellspacing="0">
|
|
<tr><td class="onelinetop"><span class="button">Save to file...</span></td><td width="10"> </td><td>let's you save different settings as separate profiles, which on double-click open an accordingly configured Terminal.</td></tr>
|
|
<tr><td><span class="button">Revert</span></td><td> </td><td>brings back the settings that were active when you opened the settings panel.</td></tr>
|
|
<tr><td><span class="button">Defaults</span></td><td> </td><td>resets everything to default values.</td></tr>
|
|
</table>
|
|
<h2>
|
|
<a href="#"><img src="../../images/up.png" style="border:none;float:right" alt="index" /></a>
|
|
<a id="shortcuts" name="shortcuts">Dreceres del teclat</a></h2>
|
|
<p>You'll find a list of useful shortcuts in <a href="../keyboard-shortcuts.html#terminal">Shortcuts and key combinations</a>.</p>
|
|
<p>Another nice feature that is more a key & mouse combination: When holding <span class="key">ALT</span> 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 <span class="menu">Copy path</span> or <span class="menu">Copy absolute path</span>. Imagine you're in <span class="path">/MyData/source/haiku/</span> and have the path <span class="path">generated/objects/haiku/x86_gcc2/release/apps/stylededit/StyledEdit</span> under the mouse pointer, the latter menu item will result in the combined, absolute path <<i>deep breath</i>>:<br /> <span class="path">/MyData/source/haiku/generated/objects/haiku/x86_gcc2/release/apps/stylededit/StyledEdit</span>.</p>
|
|
<p>If you hold down <span class="key">ALT</span> <span class="key">SHIFT</span>, only the path from beginning to where your mouse pointer sits will be highlighted.</p>
|
|
<p>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.</p>
|
|
|
|
<h2>
|
|
<a href="#"><img src="../../images/up.png" style="border:none;float:right" alt="index" /></a>
|
|
<a id="customization" name="customization">Personalització del Bash</a></h2>
|
|
<p>Coming from Unix, there are countless possibilities to customize the bash itself. There are two files that are especially important to the user: <span class="cli">profile</span> and <span class="cli">inputrc</span><br />
|
|
Both files can be created in the <span class="path">/boot/home/config/settings/</span> folder and add or override the system defaults that are defined in <span class="path">/boot/system/settings/etc/</span>.</p>
|
|
|
|
<h3>profile</h3>
|
|
<p>The <span class="cli">profile</span> 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.</p>
|
|
<p>The Haiku/BeOS Tip Server has quite a few tips to get you started, for example:</p>
|
|
<ul>
|
|
<li><a href="https://betips.net/?p=5">Customize your Terminal prompt</a></li>
|
|
<li><a href="https://betips.net/?p=66">More prompt customizations</a></li>
|
|
<li><a href="https://betips.net/?p=67">Enhancing bash</a></li>
|
|
<li><a href="https://betips.net/?p=105">Custom keyboard shortcuts</a></li>
|
|
</ul>
|
|
<p>There are more, <a href="https://betips.net/?s=profile">have a look</a>.</p>
|
|
|
|
<h3>inputrc</h3>
|
|
<p>The <span class="cli">inputrc</span> 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. <a href="http://tiswww.case.edu/php/chet/readline/rluserman.html">The GNU Readline Library</a>.</p>
|
|
|
|
<h2>
|
|
<a href="#"><img src="../../images/up.png" style="border:none;float:right" alt="index" /></a>
|
|
<a id="hints" name="hints">Consells per treballar amb el Terminal</a></h2>
|
|
<ul><li><p>Dragging a file or folder from a Tracker window into the Terminal will insert its path at the location of the cursor. Dragging with the right mouse button offers additional actions in a context menu:</p>
|
|
<table summary="layout" border="0" cellpadding="2" cellspacing="0">
|
|
<tr><td><span class="menu">Insert path</span></td><td> </td><td>Inserts the location of the file, same as drag & dropping with the left mouse button.</td></tr>
|
|
<tr><td><span class="menu">Change directory</span></td><td> </td><td>Changes to the folder of the dragged file.</td></tr>
|
|
<tr><td><span class="menu">Create link here</span></td><td> </td><td>Creates a link to the dragged file in the current working directory of the Terminal.</td></tr>
|
|
<tr><td><span class="menu">Move here</span></td><td> </td><td>Moves the dragged file into the current working directory of the Terminal.</td></tr>
|
|
<tr><td><span class="menu">Copy here</span></td><td> </td><td>Copies the dragged file into the current working directory of the Terminal.</td></tr>
|
|
</table></li>
|
|
<li><p>You can open any file with its preferred application with the command <span class="cli">open <i>[filename]</i></span>. This also works with the representation of the current ("<span class="cli">.</span>") and parent ("<span class="cli">..</span>") folder which then open in a Tracker window. So, to open the current working directory, you type:</p>
|
|
<pre class="terminal">open .</pre>
|
|
</li></ul>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="nav">
|
|
<div class="inner"><span>
|
|
« <a href="stylededit.html">StyledEdit</a>
|
|
:: <a href="../applications.html#list-of-apps" class="uplink">Aplicacions</a>
|
|
:: <a href="textsearch.html">TextSearch</a> »
|
|
</span></div>
|
|
</div>
|
|
|
|
</body>
|
|
</html>
|