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