Cleaned up zsh config
This commit is contained in:
parent
0e95e107cc
commit
3be5fd939f
@ -1,14 +1,9 @@
|
||||
alias ls='ls --color=always -h'
|
||||
alias ll='ls -la'
|
||||
alias ...='cd ../..'
|
||||
alias ydl="youtube-dl -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best'"
|
||||
alias google='ping -c 10240000 google.com'
|
||||
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 nmap_localnet='nmap -sP 10.0.3.0/24'
|
||||
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 ltitle='echo -ne "\033]0;$HOST\007"'
|
||||
|
||||
case `uname` in
|
||||
Darwin)
|
||||
@ -18,6 +13,9 @@ case `uname` in
|
||||
alias emptytrash="sudo rm -rfv /Volumes/*/.Trashes; sudo rm -rfv ~/.Trash; sudo rm -rfv /private/var/log/asl/*.asl"
|
||||
alias r='open -a'
|
||||
alias sulast='sudo $(history -p !-1)'
|
||||
alias ydl="youtube-dl -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best'"
|
||||
alias google='ping -c 10240000 google.com'
|
||||
alias nmap_localnet='nmap -sP 10.0.3.0/24'
|
||||
;;
|
||||
Linux)
|
||||
# commands for Linux go here
|
||||
|
@ -30,22 +30,3 @@ bindkey '^?' backward-delete-char
|
||||
bindkey "^[[3~" delete-char
|
||||
bindkey "^[3;5~" delete-char
|
||||
bindkey "\e[3~" delete-char
|
||||
|
||||
# consider emacs keybindings:
|
||||
|
||||
#bindkey -e ## emacs key bindings
|
||||
#
|
||||
#bindkey '^[[A' up-line-or-search
|
||||
#bindkey '^[[B' down-line-or-search
|
||||
#bindkey '^[^[[C' emacs-forward-word
|
||||
#bindkey '^[^[[D' emacs-backward-word
|
||||
#
|
||||
#bindkey -s '^X^Z' '%-^M'
|
||||
#bindkey '^[e' expand-cmd-path
|
||||
#bindkey '^[^I' reverse-menu-complete
|
||||
#bindkey '^X^N' accept-and-infer-next-history
|
||||
#bindkey '^W' kill-region
|
||||
#bindkey '^I' complete-word
|
||||
## Fix weird sequence that rxvt produces
|
||||
#bindkey -s '^[[Z' '\t'
|
||||
#
|
||||
|
16
.zsh/lib/shortcuts.zsh
Normal file
16
.zsh/lib/shortcuts.zsh
Normal file
@ -0,0 +1,16 @@
|
||||
# Directory shortcuts
|
||||
# You can use cd ~x and vim ~x/file instead of cd /very/long/and/often/accessed/path. Some examples:
|
||||
hash -d bin=$HOME/bin
|
||||
|
||||
case `uname` in
|
||||
Darwin)
|
||||
hash -d hucb=~$HOME/Sites/christianbaer.me
|
||||
;;
|
||||
Linux)
|
||||
# commands for Linux go here
|
||||
;;
|
||||
FreeBSD)
|
||||
hash -d etc=/usr/local/etc
|
||||
hash -d www=/usr/local/www/ngineerx
|
||||
;;
|
||||
esac
|
Loading…
Reference in New Issue
Block a user