Greg Ward avatar 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
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.