projects
/
config
/
bash_prompt.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
10cbd8a
)
README: improve wording an provide a more robust example of use
author
Antonio Ospite <ao2@ao2.it>
Tue, 22 Jan 2019 21:02:53 +0000
(22:02 +0100)
committer
Antonio Ospite <ao2@ao2.it>
Tue, 22 Jan 2019 21:02:53 +0000
(22:02 +0100)
README
patch
|
blob
|
history
diff --git
a/README
b/README
index
9edbbaf
..
edde33c
100644
(file)
--- a/
README
+++ b/
README
@@
-1,27
+1,30
@@
bash_prompt is a collection of custom bash prompts to be loaded using the
provided `set_prompt` function.
bash_prompt is a collection of custom bash prompts to be loaded using the
provided `set_prompt` function.
-Example of use,
with bash_prompt
under ~/.bash/:
+Example of use,
assuming that bash_prompt is
under ~/.bash/:
# load git prompt support
[ -f /usr/lib/git-core/git-sh-prompt ] && . /usr/lib/git-core/git-sh-prompt
# load function to set custom shell prompts
# load git prompt support
[ -f /usr/lib/git-core/git-sh-prompt ] && . /usr/lib/git-core/git-sh-prompt
# load function to set custom shell prompts
- [ -f ~/.bash/bash_prompt/set_prompt ] && . ~/.bash/bash_prompt/set_prompt
-
- # set a different prompt for the root user
- if [ $UID -eq 0 ];
+ if [ -f ~/.bash/bash_prompt/set_prompt ];
then
then
- set_prompt fire
- else
- set_prompt iceg
+ . ~/.bash/bash_prompt/set_prompt
+
+ # set a different prompt for the root user
+ if [ $UID -eq 0 ];
+ then
+ set_prompt fire
+ else
+ set_prompt iceg
+ fi
fi
The prompts can contain backslash-escaped special characters as specified in
the bash(1) man page, or any ANSI escape sequences as described in the
console_codes(4) man page.
fi
The prompts can contain backslash-escaped special characters as specified in
the bash(1) man page, or any ANSI escape sequences as described in the
console_codes(4) man page.
-The `set_prompt` function
provides symbolic constant
for the most used escape
+The `set_prompt` function
defines symbolic constants
for the most used escape
sequences, see the source code for the details.
Inspired by bashish: http://bashish.sourceforge.net/
sequences, see the source code for the details.
Inspired by bashish: http://bashish.sourceforge.net/