My dotfiles. Period.

global-after.bashrc 770B

1234567891011121314151617181920212223242526272829303132333435
  1. #!/bin/bash
  2. ######################################################
  3. ### things to do AFTER host/user-specific settings ###
  4. ######################################################
  5. ### .... ###
  6. ### BASH ###
  7. ### '''' ###
  8. make_ps1() {
  9. source "${HOME}/.bash/colors"
  10. # these functions must be already defined by ~/.bash/user/*.bashrc
  11. # and ~/.bash/host/*.bashrc
  12. ps1u=$(make_ps1u)
  13. ps1h=$(make_ps1h)
  14. ps1w="$lblue\w$normal";
  15. ps1G='$(__git_ps1 "(%s)")';
  16. ps1g="$green$ps1G$normal";
  17. echo "$ps1u@$ps1h:$ps1w$ps1g$normal\$ ";
  18. }
  19. make_ps2() {
  20. source "${HOME}/.bash/colors"
  21. echo "$white>$yellow>$lyellow>$normal ";
  22. }
  23. # and use to assemble own PS1
  24. export PS1=$(make_ps1)
  25. export PS2=$(make_ps2)
  26. ### ...... ###
  27. ### OTHERS ###
  28. ### '''''' ###