Added gitignore entries needed to ignore derived objects generated from full build...
[bash.git] / examples / scripts.noah / prompt.bash
blob3dc25a92eb08a095604faf76b237037e7c6cadd2
1 # prompt.bash
2 # Author: Noah Friedman <friedman@prep.ai.mit.edu>
3 # Created: 1992-01-15
4 # Public domain
6 # $Id: prompt.bash,v 1.2 1994/10/18 16:34:35 friedman Exp $
8 # Commentary:
9 # Code:
11 #:docstring prompt:
12 # Usage: prompt [chars]
14 # Various preformatted prompt strings selected by argument. For a
15 # list of available arguments and corresponding formats, do
16 # `type prompt'.
17 #:end docstring:
19 ###;;;autoload
20 function prompt ()
22 case "$1" in
23 d) PS1='$(dirs) \$ ' ;;
24 n) PS1='\$ ' ;;
25 hsw) PS1='\h[$SHLVL]: \w \$ ' ;;
26 hw) PS1='\h: \w \$ ' ;;
27 sh) PS1='[$SHLVL] \h\$ ' ;;
28 sw) PS1='[$SHLVL] \w \$ ' ;;
29 uh) PS1='\u@\h\$ ' ;;
30 uhsHw) PS1='\u@\h[$SHLVL]:\#: \w \$ ' ;;
31 uhsw) PS1='\u@\h[$SHLVL]: \w \$ ' ;;
32 uhw) PS1='\u@\h: \w \$ ' ;;
33 uw) PS1='(\u) \w \$ ' ;;
34 w) PS1='\w \$ ' ;;
35 esac
38 provide prompt
40 # prompt.bash ends here