diff --git a/.zsh/lib/aliases.zsh b/.zsh/lib/aliases.zsh index 72da06f..6f918c1 100644 --- a/.zsh/lib/aliases.zsh +++ b/.zsh/lib/aliases.zsh @@ -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 diff --git a/.zsh/lib/key_bindings.zsh b/.zsh/lib/key_bindings.zsh index 5c1b90b..2a70f20 100644 --- a/.zsh/lib/key_bindings.zsh +++ b/.zsh/lib/key_bindings.zsh @@ -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' -# diff --git a/.zsh/lib/shortcuts.zsh b/.zsh/lib/shortcuts.zsh new file mode 100644 index 0000000..3527d45 --- /dev/null +++ b/.zsh/lib/shortcuts.zsh @@ -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