Commits

Greg Ward committed 0ce9e9d

Make example setup documentation consistent between README and man page.

Comments (0)

Files changed (2)

 
 To use it with bash, just call it in PS1:
 
-  PS1='\u@\h:\w $(vcprompt)\$'
+  PS1='\u@\h $(vcprompt)\$ '
 
 To use it with zsh, you need to enable shell option PROMPT_SUBST, and
 then do similarly to bash:
 
 .SH CONFIGURING BASH
 
-Set shell variable
-.B PROMPT_COMMAND
-to run
+Use command substitution to include the output of
 .B vcprompt
-every time bash generates the prompt. For example, add
+in your prompt. For example, add
 .nf
 .in +2m
-PROMPT_COMMAND='vcprompt -f "[%b] "'
+if [ "$PS1" ]; then
+  PS1='\u@\h $(vcprompt -f "[%b]")\$ '
+fi
 .in -2m
 .fi
-(with your preferred format string) to
+to
 .I ~/.bashrc.
-Set
-.B PS1
-as normal. This means that
-.B vcprompt
-output will always come first.
+You can of course use all of bash's prompt escape sequences; the above
+is just an example.
 
 .SH CONFIGURING ZSH
 Enable the
 .in +2m
 if [ -n "$PROMPT" ]; then
   setopt prompt_subst
-  PROMPT='$(vcprompt -f "[%b] ")$ '
+  PROMPT='%n@%m $(vcprompt -f "[%b]")$ '
 fi
 .in -2m
 .fi