X-Git-Url: https://git.shemshak.org/~bandali/configs/blobdiff_plain/6b8582fa39ded47649cfc3d7097806a39a5889ad..efbfa83fb174bd5dd7def633929a637ae547bd06:/.bashrc diff --git a/.bashrc b/.bashrc index a355b0c..cce2dc8 100644 --- a/.bashrc +++ b/.bashrc @@ -1,9 +1,39 @@ -# -# ~/.bashrc -# +# various bash tweaks +shopt -s histappend +shopt -s cmdhist +HISTSIZE= +HISTFILESIZE= +HISTCONTROL=ignoreboth +HISTIGNORE='ls:l:s:bg:fg:history' +HISTTIMEFORMAT='%F %T ' +stty stop "" -# If not running interactively, don't do anything +# aliases +alias ls='ls --color=auto' +alias mpv="mpv --ytdl-format mp4" +alias mv="mv -iv" +alias cp="cp -iv" +alias scl=systemctl +alias jcl=journalctl +alias m="mbsync csclub; mbsync uwaterloo; mbsync amin" +alias best="youtube-dl -f best" + +aur() { + cd ~/usr/builds + git clone https://aur.archlinux.org/${1}.git + cd ${1} +} + +# i-beam cursor +# echo -e "\033[5 q" # blinking +echo -e "\033[6 q" # non-blinking + + +# If not running interactively, don't do anything else [[ $- != *i* ]] && return -alias ls='ls --color=auto' -PS1='[\u@\h \W]\$ ' +a_prompt() { + cwd=$(pwd | sed -e "s!$HOME!~!" | sed -re "s!([^/])[^/]+/!\1/!g") + printf $cwd +} +PS1="\u@\h \$(a_prompt)> "