My dotfiles. Period.

post.bashrc 702B

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