This file is indexed.

/usr/share/doc/octave/octave.html/Customizing-the-Prompt.html is in octave-doc 4.2.2-1ubuntu1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Customizing the Prompt (GNU Octave)</title>

<meta name="description" content="Customizing the Prompt (GNU Octave)">
<meta name="keywords" content="Customizing the Prompt (GNU Octave)">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<link href="index.html#Top" rel="start" title="Top">
<link href="Concept-Index.html#Concept-Index" rel="index" title="Concept Index">
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="Command-Line-Editing.html#Command-Line-Editing" rel="up" title="Command Line Editing">
<link href="Diary-and-Echo-Commands.html#Diary-and-Echo-Commands" rel="next" title="Diary and Echo Commands">
<link href="Customizing-readline.html#Customizing-readline" rel="prev" title="Customizing readline">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
blockquote.indentedblock {margin-right: 0em}
blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
blockquote.smallquotation {font-size: smaller}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
div.smalldisplay {margin-left: 3.2em}
div.smallexample {margin-left: 3.2em}
div.smalllisp {margin-left: 3.2em}
kbd {font-style: oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: inherit; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: inherit; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
ul.no-bullet {list-style: none}
-->
</style>
<link rel="stylesheet" type="text/css" href="octave.css">


</head>

<body lang="en">
<a name="Customizing-the-Prompt"></a>
<div class="header">
<p>
Next: <a href="Diary-and-Echo-Commands.html#Diary-and-Echo-Commands" accesskey="n" rel="next">Diary and Echo Commands</a>, Previous: <a href="Customizing-readline.html#Customizing-readline" accesskey="p" rel="prev">Customizing readline</a>, Up: <a href="Command-Line-Editing.html#Command-Line-Editing" accesskey="u" rel="up">Command Line Editing</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html#Concept-Index" title="Index" rel="index">Index</a>]</p>
</div>
<hr>
<a name="Customizing-the-Prompt-1"></a>
<h4 class="subsection">2.4.7 Customizing the Prompt</h4>
<a name="index-prompt-customization"></a>
<a name="index-customizing-the-prompt"></a>

<p>The following variables are available for customizing the appearance of
the command-line prompts.  Octave allows the prompt to be customized by
inserting a number of backslash-escaped special characters that are
decoded as follows:
</p>
<dl compact="compact">
<dt>&lsquo;<samp>\t</samp>&rsquo;</dt>
<dd><p>The time.
</p>
</dd>
<dt>&lsquo;<samp>\d</samp>&rsquo;</dt>
<dd><p>The date.
</p>
</dd>
<dt>&lsquo;<samp>\n</samp>&rsquo;</dt>
<dd><p>Begins a new line by printing the equivalent of a carriage return
followed by a line feed.
</p>
</dd>
<dt>&lsquo;<samp>\s</samp>&rsquo;</dt>
<dd><p>The name of the program (usually just &lsquo;<samp>octave</samp>&rsquo;).
</p>
</dd>
<dt>&lsquo;<samp>\w</samp>&rsquo;</dt>
<dd><p>The current working directory.
</p>
</dd>
<dt>&lsquo;<samp>\W</samp>&rsquo;</dt>
<dd><p>The basename of the current working directory.
</p>
</dd>
<dt>&lsquo;<samp>\u</samp>&rsquo;</dt>
<dd><p>The username of the current user.
</p>
</dd>
<dt>&lsquo;<samp>\h</samp>&rsquo;</dt>
<dd><p>The hostname, up to the first &lsquo;.&rsquo;.
</p>
</dd>
<dt>&lsquo;<samp>\H</samp>&rsquo;</dt>
<dd><p>The hostname.
</p>
</dd>
<dt>&lsquo;<samp>\#</samp>&rsquo;</dt>
<dd><p>The command number of this command, counting from when Octave starts.
</p>
</dd>
<dt>&lsquo;<samp>\!</samp>&rsquo;</dt>
<dd><p>The history number of this command.  This differs from &lsquo;<samp>\#</samp>&rsquo; by the
number of commands in the history list when Octave starts.
</p>
</dd>
<dt>&lsquo;<samp>\$</samp>&rsquo;</dt>
<dd><p>If the effective UID is 0, a &lsquo;<samp>#</samp>&rsquo;, otherwise a &lsquo;<samp>$</samp>&rsquo;.
</p>
</dd>
<dt>&lsquo;<samp>\nnn</samp>&rsquo;</dt>
<dd><p>The character whose character code in octal is <var>nnn</var>.
</p>
</dd>
<dt>&lsquo;<samp>\\</samp>&rsquo;</dt>
<dd><p>A backslash.
</p></dd>
</dl>

<a name="XREFPS1"></a><dl>
<dt><a name="index-PS1"></a>: <em><var>val</var> =</em> <strong>PS1</strong> <em>()</em></dt>
<dt><a name="index-PS1-1"></a>: <em><var>old_val</var> =</em> <strong>PS1</strong> <em>(<var>new_val</var>)</em></dt>
<dt><a name="index-PS1-2"></a>: <em></em> <strong>PS1</strong> <em>(<var>new_val</var>, &quot;local&quot;)</em></dt>
<dd><p>Query or set the primary prompt string.
</p>
<p>When executing interactively, Octave displays the primary prompt when it is
ready to read a command.
</p>
<p>The default value of the primary prompt string is <code>'octave:\#&gt; '</code>.
To change it, use a command like
</p>
<div class="example">
<pre class="example">PS1 (&quot;\\u@\\H&gt; &quot;)
</pre></div>

<p>which will result in the prompt &lsquo;<samp>boris@kremvax&gt; </samp>&rsquo; for the user
&lsquo;<samp>boris</samp>&rsquo; logged in on the host &lsquo;<samp>kremvax.kgb.su</samp>&rsquo;.  Note that two
backslashes are required to enter a backslash into a double-quoted
character string.  See <a href="Strings.html#Strings">Strings</a>.
</p>
<p>You can also use ANSI escape sequences if your terminal supports them.
This can be useful for coloring the prompt.  For example,
</p>
<div class="example">
<pre class="example">PS1 ('\[\033[01;31m\]\s:\#&gt; \[\033[0m\]')
</pre></div>

<p>will give the default Octave prompt a red coloring.
</p>
<p>When called from inside a function with the <code>&quot;local&quot;</code> option, the
variable is changed locally for the function and any subroutines it calls.
The original variable value is restored when exiting the function.
</p>
<p><strong>See also:</strong> <a href="#XREFPS2">PS2</a>, <a href="#XREFPS4">PS4</a>.
</p></dd></dl>


<a name="XREFPS2"></a><dl>
<dt><a name="index-PS2"></a>: <em><var>val</var> =</em> <strong>PS2</strong> <em>()</em></dt>
<dt><a name="index-PS2-1"></a>: <em><var>old_val</var> =</em> <strong>PS2</strong> <em>(<var>new_val</var>)</em></dt>
<dt><a name="index-PS2-2"></a>: <em></em> <strong>PS2</strong> <em>(<var>new_val</var>, &quot;local&quot;)</em></dt>
<dd><p>Query or set the secondary prompt string.
</p>
<p>The secondary prompt is printed when Octave is expecting additional input to
complete a command.  For example, if you are typing a <code>for</code> loop that
spans several lines, Octave will print the secondary prompt at the beginning
of each line after the first.  The default value of the secondary prompt
string is <code>&quot;&gt; &quot;</code>.
</p>
<p>When called from inside a function with the <code>&quot;local&quot;</code> option, the
variable is changed locally for the function and any subroutines it calls.
The original variable value is restored when exiting the function.
</p>
<p><strong>See also:</strong> <a href="#XREFPS1">PS1</a>, <a href="#XREFPS4">PS4</a>.
</p></dd></dl>


<a name="XREFPS4"></a><dl>
<dt><a name="index-PS4"></a>: <em><var>val</var> =</em> <strong>PS4</strong> <em>()</em></dt>
<dt><a name="index-PS4-1"></a>: <em><var>old_val</var> =</em> <strong>PS4</strong> <em>(<var>new_val</var>)</em></dt>
<dt><a name="index-PS4-2"></a>: <em></em> <strong>PS4</strong> <em>(<var>new_val</var>, &quot;local&quot;)</em></dt>
<dd><p>Query or set the character string used to prefix output produced
when echoing commands is enabled.
</p>
<p>The default value is <code>&quot;+ &quot;</code>.
See <a href="Diary-and-Echo-Commands.html#Diary-and-Echo-Commands">Diary and Echo Commands</a>, for a description of echoing commands.
</p>
<p>When called from inside a function with the <code>&quot;local&quot;</code> option, the
variable is changed locally for the function and any subroutines it calls.
The original variable value is restored when exiting the function.
</p>
<p><strong>See also:</strong> <a href="Diary-and-Echo-Commands.html#XREFecho">echo</a>, <a href="Diary-and-Echo-Commands.html#XREFecho_005fexecuting_005fcommands">echo_executing_commands</a>, <a href="#XREFPS1">PS1</a>, <a href="#XREFPS2">PS2</a>.
</p></dd></dl>


<hr>
<div class="header">
<p>
Next: <a href="Diary-and-Echo-Commands.html#Diary-and-Echo-Commands" accesskey="n" rel="next">Diary and Echo Commands</a>, Previous: <a href="Customizing-readline.html#Customizing-readline" accesskey="p" rel="prev">Customizing readline</a>, Up: <a href="Command-Line-Editing.html#Command-Line-Editing" accesskey="u" rel="up">Command Line Editing</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Concept-Index.html#Concept-Index" title="Index" rel="index">Index</a>]</p>
</div>



</body>
</html>