Added case switch for OS specific aliases in ZSH config
This commit is contained in:
parent
14b797482b
commit
fe48ad4c81
@ -4,18 +4,25 @@ alias ...='cd ../..'
|
|||||||
alias ydl="youtube-dl -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best'"
|
alias ydl="youtube-dl -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best'"
|
||||||
alias google='ping -c 10240000 google.com'
|
alias google='ping -c 10240000 google.com'
|
||||||
alias foldersize='du -sh'
|
alias foldersize='du -sh'
|
||||||
alias nmap_localnet='nmap -sP 192.168.1.0/24'
|
alias nmap_localnet='nmap -sP 10.0.3.0/24'
|
||||||
alias sulast='sudo $(history -p !-1)'
|
|
||||||
alias whois="whois -h whois-servers.net"
|
alias whois="whois -h whois-servers.net"
|
||||||
alias ltmux="if tmux has-session -t $USER; then tmux attach -d -t $USER; else tmux new -s $USER; fi"
|
alias ltmux="if tmux has-session -t $USER; then tmux attach -d -t $USER; else tmux new -s $USER; fi"
|
||||||
alias ltitle='echo -ne "\033]0;$HOST\007"'
|
alias ltitle='echo -ne "\033]0;$HOST\007"'
|
||||||
alias ssh-copy-id='_(){ ssh $1 -p 5022 "mkdir -m 700 ~/.ssh; echo " $(< ~/.ssh/id_rsa.pub) " >> ~/.ssh/authorized_keys ; chmod 600 ~/.ssh/authorized_keys"; }; _'
|
|
||||||
alias emptytrash="sudo rm -rfv /Volumes/*/.Trashes; sudo rm -rfv ~/.Trash; sudo rm -rfv /private/var/log/asl/*.asl"
|
case `uname` in
|
||||||
alias r='open -a'
|
Darwin)
|
||||||
alias htop='sudo htop'
|
# commands for OS X go here
|
||||||
alias ttop="nice top -j -P -a"
|
alias flushdns='dscacheutil -flushcache && killall -HUP mDNSResponder'
|
||||||
alias flushdns='dscacheutil -flushcache && killall -HUP mDNSResponder'
|
alias htop='sudo htop'
|
||||||
alias pkg_add='brew install'
|
alias emptytrash="sudo rm -rfv /Volumes/*/.Trashes; sudo rm -rfv ~/.Trash; sudo rm -rfv /private/var/log/asl/*.asl"
|
||||||
alias pkg_search='brew search'
|
alias r='open -a'
|
||||||
alias pkg_remove='brew remove'
|
alias sulast='sudo $(history -p !-1)'
|
||||||
alias pkg_upgrade='brew update && brew upgrade && brew cleanup && brew cask cleanup'
|
;;
|
||||||
|
Linux)
|
||||||
|
# commands for Linux go here
|
||||||
|
;;
|
||||||
|
FreeBSD)
|
||||||
|
# commands for FreeBSD go here
|
||||||
|
alias sudo='doas'
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
Loading…
Reference in New Issue
Block a user