dotfiles

configuration files for shell, text editor, graphical environment, etc.
git clone git://src.adamsgaard.dk/dotfiles
Log | Files | Refs | Submodules | README | LICENSE

.bashrc (1369B)


      1 # If not running interactively, don't do anything
      2 [[ $- != *i* ]] && return
      3 
      4 # don't put duplicate lines in the history, and ignore lines with leading space
      5 HISTCONTROL=ignoredups:ignorespace
      6 
      7 # append to the history file, don't overwrite it
      8 shopt -s histappend
      9 
     10 # for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
     11 HISTSIZE=10000
     12 HISTFILESIZE=20000
     13 
     14 # check the window size after each command and, if necessary,
     15 # update the values of LINES and COLUMNS.
     16 [[ $DISPLAY ]] && shopt -s checkwinsize
     17 
     18 export CLICOLOR=1
     19 export HISTTIMEFORMAT='%F %T '
     20 
     21 # Set prompt appearance
     22 PS1="\n"
     23 [ "$USER" != "ad" ] && PS+="\u@"
     24 [ "$HOSTNAME" != "idkfa" ] && PS+="\h "
     25 PS1+="\w\$ "
     26 
     27 case ${TERM} in
     28 	xterm*|rxvt*|Eterm|aterm|kterm|gnome*)
     29 		PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/\~}"' ;;
     30 	screen*)
     31 		PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'printf "\033_%s@%s:%s\033\\" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/\~}"' ;;
     32 esac
     33 
     34 # shellcheck source=/dev/null
     35 [ -r /usr/share/bash-completion/bash_completion ] && \
     36 	. /usr/share/bash-completion/bash_completion || :
     37 
     38 [ -f /usr/share/fzf/key-bindings.bash ] && \
     39 	. /usr/share/fzf/key-bindings.bash ] || :
     40 [ -f /usr/share/doc/fzf/key-bindings.bash ] && \
     41 	. /usr/share/doc/fzf/key-bindings.bash ] || :
     42 
     43 . ~/.config/sh/commands