case ${TERM} in st*|xterm*|rxvt*|Eterm|aterm|kterm|gnome*|alacritty) PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'printf "\033]0;%s:%s\007" "${USER}" "${PWD/#$HOME/\~}"' ;; screen*) PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'printf "\033_%s:%s\033\\" "${USER}" "${PWD/#$HOME/\~}"' ;; esac alias rm='rm -i' alias ls='ls --group-directories-first -vhF --color=always' alias hh='cd $HOME' alias bk='cd $OLDPWD' alias ..='cd ..' alias ...='cd ../..' alias ....='cd ../../..' alias .....='cd ../../../..' alias ......='cd ../../../../..' alias lower="tr '[:upper:]' '[:lower:]'" alias upper="tr '[:lower:]' '[:upper:]'" alias rot13="tr abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ nopqrstuvwxyzabcdefghijklmNOPQRSTUVWXYZABCDEFGHIJKLM" mvf() { mv $*; cd $_ ;} c() { echo 'scale=13;' $* | bc -l; } j() { ce $*; cd `head -n 1 $HOME/.local/share/dir_lst`; } hd() { hexdump -e '"%08.8_ax " 8/1 "%02X " " - " 8/1 "%02X "' -e '" |" "%_p"' -e '"|\n"' "$@"; } mkpw() { cat /dev/urandom | tr -dc "[:print:]" | fold -w `[[ "$2" == "" ]] && echo 16 || echo $2` | head -n `[[ "$1" == "" ]] && echo 1 || echo "$1"` ;} stty -ixon umask 077 set -o emacs shopt -s autocd shopt -s checkwinsize # don't put duplicate lines or lines starting with space in the history. # See bash(1) for more options HISTCONTROL=ignoreboth # append to the history file, don't overwrite it shopt -s histappend # for setting history length see HISTSIZE and HISTFILESIZE in bash(1) HISTSIZE=1000 HISTFILESIZE=2000 # make less more friendly for non-text input files, see lesspipe(1) [ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" # colored GCC warnings and errors export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01' if [ -f ~/.bash_aliases ]; then . ~/.bash_aliases fi # Load the prompt source .bashprompt