summaryrefslogtreecommitdiffstats
path: root/fish/guestfish.pod
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2012-10-29 12:49:21 +0000
committerRichard W.M. Jones <rjones@redhat.com>2012-10-29 12:49:21 +0000
commitbad5c7d5a50e7f340d3a5daff59d7f3c18c0ab8f (patch)
tree9fecd1c7daf53c89ab9532308a39cc8b4abbb568 /fish/guestfish.pod
parent9de4dfddc7acf0d6c9d3a32f5d923ffa650cbce1 (diff)
downloadlibguestfs-bad5c7d5a50e7f340d3a5daff59d7f3c18c0ab8f.tar.gz
libguestfs-bad5c7d5a50e7f340d3a5daff59d7f3c18c0ab8f.tar.xz
libguestfs-bad5c7d5a50e7f340d3a5daff59d7f3c18c0ab8f.zip
fish: Add GUESTFISH_PS1 environment variable to control prompt.
Diffstat (limited to 'fish/guestfish.pod')
-rw-r--r--fish/guestfish.pod69
1 files changed, 69 insertions, 0 deletions
diff --git a/fish/guestfish.pod b/fish/guestfish.pod
index 4a665e0f..94b3df48 100644
--- a/fish/guestfish.pod
+++ b/fish/guestfish.pod
@@ -1103,6 +1103,71 @@ interactively. You can enable them even for non-interactive modes
using I<--progress-bars>, and you can disable them completely using
I<--no-progress-bars>.
+=head1 PROMPT
+
+You can change or add colours to the default prompt
+(C<E<gt>E<lt>fsE<gt>>) by setting the C<GUESTFISH_PS1> environment
+variable. A simple change can be made simply by setting this to an
+alternate string:
+
+ $ GUESTFISH_PS1='(type a command) '
+ $ export GUESTFISH_PS1
+ $ guestfish
+ [...]
+ (type a command) ls
+
+You can also use special escape sequences, as described in the table
+below:
+
+=over 4
+
+=item \\
+
+A literal backslash character.
+
+=item \[
+
+=item \]
+
+Place non-printing characters (eg. terminal control codes for colours)
+between C<\[...\]>. What this does it to tell the L<readline(3)>
+library that it should treat this subsequence as zero-width, so that
+command-line redisplay, editing etc works.
+
+=item \a
+
+A bell character.
+
+=item \e
+
+An ASCII ESC (escape) character.
+
+=item \n
+
+A newline.
+
+=item \r
+
+A carriage return.
+
+=item \NNN
+
+The ASCII character whose code is the octal value NNN.
+
+=item \xNN
+
+The ASCII character whose code is the hex value NN.
+
+=back
+
+=head2 EXAMPLES OF PROMPTS
+
+Note these these require a terminal that supports ANSI escape codes.
+
+ GUESTFISH_PS1='\[\e[1;30m\]><fs>\[\e[0;30m\] '
+
+A bold black version of the ordinary prompt.
+
=head1 GUESTFISH COMMANDS
The commands in this section are guestfish convenience commands, in
@@ -1162,6 +1227,10 @@ Used with the I<--remote> option to specify the remote guestfish
process to control. See section
L</REMOTE CONTROL GUESTFISH OVER A SOCKET>.
+=item GUESTFISH_PS1
+
+Set the command prompt. See L</PROMPT>.
+
=item HEXEDITOR
The L</hexedit> command uses C<$HEXEDITOR> as the external hex