cce2dc81dda64f7629559bebe4652fe2a40c30ff
[~bandali/configs] / .bashrc
1 # various bash tweaks
2 shopt -s histappend
3 shopt -s cmdhist
4 HISTSIZE=
5 HISTFILESIZE=
6 HISTCONTROL=ignoreboth
7 HISTIGNORE='ls:l:s:bg:fg:history'
8 HISTTIMEFORMAT='%F %T '
9 stty stop ""
10
11 # aliases
12 alias ls='ls --color=auto'
13 alias mpv="mpv --ytdl-format mp4"
14 alias mv="mv -iv"
15 alias cp="cp -iv"
16 alias scl=systemctl
17 alias jcl=journalctl
18 alias m="mbsync csclub; mbsync uwaterloo; mbsync amin"
19 alias best="youtube-dl -f best"
20
21 aur() {
22 cd ~/usr/builds
23 git clone https://aur.archlinux.org/${1}.git
24 cd ${1}
25 }
26
27 # i-beam cursor
28 # echo -e "\033[5 q" # blinking
29 echo -e "\033[6 q" # non-blinking
30
31
32 # If not running interactively, don't do anything else
33 [[ $- != *i* ]] && return
34
35 a_prompt() {
36 cwd=$(pwd | sed -e "s!$HOME!~!" | sed -re "s!([^/])[^/]+/!\1/!g")
37 printf $cwd
38 }
39 PS1="\u@\h \$(a_prompt)> "