ZSH: Beginning of reconfiguring everything
This commit is contained in:
44
.config/zsh/conf.d/20-aliases.zsh
Executable file
44
.config/zsh/conf.d/20-aliases.zsh
Executable file
@@ -0,0 +1,44 @@
|
||||
_exists() { (( $+commands[$1] )) }
|
||||
|
||||
_exists less && export PAGER=less
|
||||
|
||||
if _exists vim; then
|
||||
export EDITOR=vim
|
||||
alias vim="vim -p"
|
||||
fi
|
||||
|
||||
## ls/eza
|
||||
if _exists eza; then
|
||||
alias eza="eza --color --icons --git"
|
||||
alias ls="eza"
|
||||
fi
|
||||
|
||||
unfunction _exists
|
||||
|
||||
|
||||
alias mkdir="mkdir -p"
|
||||
alias ..="cd .."
|
||||
alias ...="cd ../.."
|
||||
alias ....="cd ../../.."
|
||||
alias google="ping -c 10240000 google.com"
|
||||
alias history="history -i"
|
||||
alias sulast="sudo $(history -p !-1)"
|
||||
alias ydl="youtube-dl -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best'"
|
||||
alias htop="sudo htop"
|
||||
|
||||
case `uname` in
|
||||
Darwin)
|
||||
# commands for OS X go here
|
||||
alias flushdns="sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder"
|
||||
alias r="open -a"
|
||||
alias fetch="curl -O"
|
||||
;;
|
||||
Linux)
|
||||
# commands for Linux go here
|
||||
;;
|
||||
FreeBSD)
|
||||
# commands for FreeBSD go here
|
||||
alias stl="sockstat -l"
|
||||
alias ziostat="cmdwatch -n 1 zpool iostat -vy 1 1"
|
||||
;;
|
||||
esac
|
||||
Reference in New Issue
Block a user