.bashrc 1023 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. # Bash initialization for interactive non-login shells and
  2. # for remote shells (info "(bash) Bash Startup Files").
  3. # Export 'SHELL' to child processes. Programs such as 'screen'
  4. # honor it and otherwise use /bin/sh.
  5. export SHELL
  6. if [[ $- != *i* ]]
  7. then
  8. # We are being invoked from a non-interactive shell. If this
  9. # is an SSH session (as in "ssh host command"), source
  10. # /etc/profile so we get PATH and other essential variables.
  11. [[ -n "$SSH_CLIENT" ]] && source /etc/profile
  12. # Don't do anything else.
  13. return
  14. fi
  15. # Source the system-wide file.
  16. source /etc/bashrc
  17. # Adjust the prompt depending on whether we're in 'guix environment'.
  18. if [ -n "$GUIX_ENVIRONMENT" ]
  19. then
  20. PS1='\e[1;37m[\e[1;32m\w\e[1;37m]\e[m \e[0;34m\D{%F %T}\e[m\n\e[1;37m[env]\$\e[m '
  21. else
  22. PS1='\e[1;37m[\e[1;32m\w\e[1;37m]\e[m \e[0;34m\D{%F %T}\e[m\n\e[1;37m\$\e[m '
  23. fi
  24. mkcd(){
  25. mkdir -p "$@" && cd "$1"
  26. }
  27. alias ls='ls -p --color=auto'
  28. alias ll='ls -lh'
  29. alias la='ls -lAh'
  30. alias l='ls -1'
  31. alias grep='grep --color=auto'