From: martin f. krafft Date: Wed, 7 May 2008 10:10:39 +0000 (+0100) Subject: add magic dotdot rationalisation X-Git-Url: https://git.madduck.net/etc/zsh.git/commitdiff_plain/c2fc1c7c9dc991f9e71b1074a5556572f7e0a368 add magic dotdot rationalisation --- diff --git a/.zsh/zshrc/00_TODO b/.zsh/zshrc/00_TODO index 1fb9583..32e197d 100644 --- a/.zsh/zshrc/00_TODO +++ b/.zsh/zshrc/00_TODO @@ -34,6 +34,17 @@ REPORTTIME=5 MAILCHECK=0 +# http://grml.org/zsh/zsh-lovers.html +rationalise-dot() { + if [[ $LBUFFER = *.. ]]; then + LBUFFER+=/.. + else + LBUFFER+=. + fi +} +zle -N rationalise-dot +bindkey . rationalise-dot + : # vim:ft=zsh diff --git a/.zsh/zshrc/30_aliases b/.zsh/zshrc/30_aliases index 2a4dd0c..39c2556 100644 --- a/.zsh/zshrc/30_aliases +++ b/.zsh/zshrc/30_aliases @@ -8,9 +8,6 @@ # Source repository: http://git.madduck.net/v/etc/zsh.git # -alias -g ...=../.. -alias -g ....=../../.. - alias mv='nocorrect mv' alias cp='nocorrect cp' alias mkdir='nocorrect mkdir'