bhupixb

Bash Rc file of my ubuntu

Jun 18th, 2020
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. # PS1="\w \n $ "
  2. function compile {
  3. # compiler flags
  4. # g++ -Wall -Wextra -Wshadow -D_GLIBCXX_ASSERTIONS -DDEBUG -ggdb3 -fmax-errors=2 -o $1{,.cpp}
  5. let="g++ -Wall -Wextra -std=c++17 -O2 -Wshadow -Wformat=2 -Wfloat-equal -Wconversion -Wlogical-op -Wshift-overflow=2 -Wduplicated-cond -Wcast-qual -Wcast-align -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC -D_FORTIFY_SOURCE=2 -fsanitize=address -fsanitize=undefined -fno-sanitize-recover -fstack-protector -ggdb3 -fmax-errors=2"
  6. $let -o $1{,.cpp}
  7. }
  8. orange=$(tput setaf 166);
  9. yellow=$(tput setaf 228);
  10. green=$(tput setaf 71);
  11. white=$(tput setaf 15);
  12. bold=$(tput bold);
  13. reset=$(tput sgr0);
  14.  
  15. PS1="\[${bold}\]\n";
  16. PS1+="\[${orange}\]\u"; #username
  17. PS1+="\[${white}\]@";
  18. PS1+="\[${yellow}\]\h"; #host
  19. PS1+="\[${white}\] in ";
  20. PS1+="\[${green}\]\w"; #working directory
  21. PS1+="\[${white}\]\n\$ \[${reset}\]";
  22. export PS1;
Add Comment
Please, Sign In to add comment