From c2fc1c7c9dc991f9e71b1074a5556572f7e0a368 Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Wed, 7 May 2008 11:10:39 +0100 Subject: [PATCH] add magic dotdot rationalisation --- .zsh/zshrc/00_TODO | 11 +++++++++++ .zsh/zshrc/30_aliases | 3 --- 2 files changed, 11 insertions(+), 3 deletions(-) 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' -- 2.39.5