Useful CLI tools (bash) for Arch Linux administration
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
728 B

2 years ago
  1. #
  2. # /etc/bash.bashrc
  3. #
  4. # If not running interactively, don't do anything
  5. [[ $- != *i* ]] && return
  6. [ $DISPLAY ] && shopt -s checkwinsize
  7. #shopt -s direxpand
  8. [ -f /etc/bash.custom ] && . /etc/bash.custom || PS1="[\u@\h \W]\$ "
  9. case ${TERM} in
  10. xterm*|rxvt*|Eterm|aterm|kterm|gnome*)
  11. PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/\~}"'
  12. ;;
  13. screen*)
  14. PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'printf "\033_%s@%s:%s\033\\" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/\~}"'
  15. ;;
  16. esac
  17. [ -r /usr/share/bash-completion/bash_completion ] && . /usr/share/bash-completion/bash_completion
  18. # Fix dollar sign escape
  19. shopt -u progcomp