X-Git-Url: https://plomlompom.com/repos/berlin_corona.txt?a=blobdiff_plain;f=buster%2Fhome_files%2Fminimal%2F.bashrc;fp=buster%2Fhome_files%2Fminimal%2F.bashrc;h=5ee9ad81e0c813beee13d8c6d2cc41f1344b7a01;hb=8c9fd1d36d516e83d34cf18b9ac79a6d9c517ede;hp=0000000000000000000000000000000000000000;hpb=9d8572dc8d3f2b1ad9b0b08526725b757f379774;p=config diff --git a/buster/home_files/minimal/.bashrc b/buster/home_files/minimal/.bashrc new file mode 100644 index 0000000..5ee9ad8 --- /dev/null +++ b/buster/home_files/minimal/.bashrc @@ -0,0 +1,26 @@ +# Settings for interactive shells. + +# Fancy colors for ls. +alias ls="ls --color=auto" + +# Use vim as default editor for anything. +export VISUAL=vim +export EDITOR=$VISUAL + +# Colored prompt with username, hostname, date/time, directory. +colornumber=7 # Default to white if no color set via colornumber dotfile. +colornumber_file=~/.shell_prompt_color +if [ -f $colornumber_file ]; then + colornumber=`cat $colornumber_file` +fi +tput_color="$(tput setaf $colornumber)$(tput bold)" +tput_reset="$(tput sgr0)" +# Bash confuses the line length when not told to not count escape sequences. +if [ ! "$BASH" = "" ]; then + tput_color="\[$tput_color\]" + tput_reset="\[$tput_reset\]" +fi +PS1="${tput_color}["\$\(date\ +%Y-%m-%d/%H:%M:%S/%Z\)" $(whoami)@$(hostname):"\$\(pwd\)"]$ $tput_reset" +PS2="${tput_color}> $tput_reset" +PS3="${tput_color}select: $tput_reset" +PS4="${tput_color}+ $tput_reset"