Advertisement
sdpagent

changing .bashrc display of path

Sep 11th, 2013
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. # Programster Injection
  2. # Here we can choose the mode for displaying the current path in bash terminal.
  3. # 1 = normal path shown
  4. # 2 = only current directory
  5. # 3 = no path at all.
  6. DISPLAY_OPTION=3
  7.  
  8. if [ "$DISPLAY_OPTION" = 1 ]; then
  9. PATH_VAR="\w"
  10. elif [ "$DISPLAY_OPTION" = 2 ]; then
  11. PATH_VAR="\W"
  12. elif [ "$DISPLAY_OPTION" = 3 ]; then
  13. PATH_VAR=""
  14. fi
  15.  
  16.  
  17. if [ "$color_prompt" = yes ]; then
  18. PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]'$PATH_VAR'\[\033[00m\]\$ '
  19. else
  20. PS1='${debian_chroot:+($debian_chroot)}\u@\h:'$PATH_VAR'\$ '
  21. fi
  22. unset color_prompt force_color_prompt
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement