I've created a little script called fancy-prompts that gives you easy access to seven different prompts. Each prompt has a limited amount of customization available. If you"source" the script:
Code: Select all
$ source ./fancy-prompts
[demo@antiX]-[04:13:39 PM]-------------------------------------[/usr/local/bin]
Code: Select all
$ ./fancy-prompts
============================================================================
Starting a new bash shell. You can avoid this by sourcing this file
instead of running it as a command. For example:
$ source ./fancy-prompts
You can return to your previous shell by typing"exit" or hitting <ctrl-d>
use -q (--quiet) to supress this message. Use -h (--help) to display help.
Type"prompt-usage" to get instructions on using fancy-prompts.
============================================================================
[demo@antiX]-[04:13:39 PM]-------------------------------------[/usr/local/bin]
$
Code: Select all
$ ./fancy-prompts -h
There are seven fancy prompt commands available:
prompt-tiny prompt-narrow
prompt-std prompt-med
prompt-color prompt-wide
prompt-gentoo
Each command changes your prompt ranging from prompt-tiny, which gives you
a very simple prompt, to prompt-wide which gives you a very fancy one.
They all have these options:
-d|--dark Make all colors darker
-h|--help Display this help
-l|--lines <INTEGER> The number of extra new lines before the prompt
-n|--nocolor Turn off colors
-p|--prompt <STRING> The final charter(s) displayed in the prompt
Examples:
Use prompt-med with no extra newline and a">" final prompt character:
prompt-med -n 0 -p">"
Use a simple prompt containing the hostname:
prompt-tiny -p"\h >"
Note: The username and the final prompt characters are red for the root user.
Code: Select all
source /usr/local/bin/fancy-prompts
prompt-wide --prompt">" --dark
I've attached a gzipped copy of the fancy-prompts script. I hope this encourages people to use a more productive prompt for the command line and maybe it will even inspire a few people to make their own further customizations.