dotfiles/.config/zsh/lib/20-aliases.zsh

39 lines
858 B
Bash
Raw Normal View History

2020-05-23 10:10:24 +02:00
_exists() { (( $+commands[$1] )) }
2020-06-09 21:17:38 +02:00
_exists less && export PAGER=less
2020-05-23 10:10:24 +02:00
if _exists vim; then
2020-06-09 21:17:38 +02:00
export EDITOR=vim
alias vim="vim -p"
2020-05-23 10:10:24 +02:00
fi
unfunction _exists
2021-12-20 17:11:15 +01:00
alias ls="ls --color -FGhk"
alias ll="ls --color -FGhkl"
2021-01-23 21:23:44 +01:00
alias mkdir="mkdir -p"
alias ...="cd ../.."
alias google="ping -c 10240000 google.com"
alias history="history -i"
2020-12-24 22:53:08 +01:00
alias sulast="sudo $(history -p !-1)"
2021-01-23 21:23:44 +01:00
alias ydl="youtube-dl -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best'"
2021-12-20 17:11:15 +01:00
alias htop="sudo htop"
case `uname` in
Darwin)
# commands for OS X go here
2021-01-23 21:23:44 +01:00
alias flushdns="sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder"
alias r="open -a"
2021-01-12 23:20:26 +01:00
alias fetch="curl -O"
;;
Linux)
# commands for Linux go here
;;
FreeBSD)
# commands for FreeBSD go here
2020-06-02 15:59:14 +02:00
alias stl="sockstat -l"
2021-10-17 22:19:05 +02:00
alias ziostat="cmdwatch -n 1 zpool iostat -vy 1 1"
;;
esac