Updated htop alias in zsh config

This commit is contained in:
Christian Baer 2020-06-29 23:19:36 +02:00
parent 5516765f06
commit e220997bc5

View File

@ -1,7 +1,6 @@
_exists() { (( $+commands[$1] )) } _exists() { (( $+commands[$1] )) }
_exists less && export PAGER=less _exists less && export PAGER=less
_exists sudo && alias doas='sudo'
if _exists vim; then if _exists vim; then
export EDITOR=vim export EDITOR=vim
@ -13,12 +12,10 @@ unfunction _exists
alias ls='ls --color=always -h' alias ls='ls --color=always -h'
alias ll='ls -lah' alias ll='ls -lah'
alias mkdir='mkdir -p' alias mkdir='mkdir -p'
alias htop='doas htop'
alias ...='cd ../..' alias ...='cd ../..'
alias foldersize='du -sh' alias foldersize='du -sh'
alias duf='du -sk * | sort -n | while read size fname; do for unit in k M G T P E Z Y; do if [ $size -lt 1024 ]; then echo -e "${size}${unit}\t${fname}"; break; fi; size=$((size/1024)); done; done' alias duf='du -sk * | sort -n | while read size fname; do for unit in k M G T P E Z Y; do if [ $size -lt 1024 ]; then echo -e "${size}${unit}\t${fname}"; break; fi; size=$((size/1024)); done; done'
alias google='ping -c 10240000 google.com' alias google='ping -c 10240000 google.com'
alias sulast='doas $(history -p !-1)'
case `uname` in case `uname` in
Darwin) Darwin)
@ -29,6 +26,8 @@ case `uname` in
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 nmap_localnet='nmap -sP 10.0.3.0/24' alias nmap_localnet='nmap -sP 10.0.3.0/24'
alias fetch='curl -O' alias fetch='curl -O'
alias htop='sudo htop'
alias sulast='sudo $(history -p !-1)'
;; ;;
Linux) Linux)
# commands for Linux go here # commands for Linux go here
@ -36,5 +35,6 @@ case `uname` in
FreeBSD) FreeBSD)
# commands for FreeBSD go here # commands for FreeBSD go here
alias stl="sockstat -l" alias stl="sockstat -l"
alias sulast='doas $(history -p !-1)'
;; ;;
esac esac