From c3ec2a49a89233234036137860a2b7a1c5d54b80 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sun, 6 Sep 2009 12:58:18 +0200 Subject: zshrc: new keybinding for ..... Signed-off-by: Florian Pritz --- .zshrc | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.zshrc b/.zshrc index 55cb0ef..bb303e9 100644 --- a/.zshrc +++ b/.zshrc @@ -68,6 +68,18 @@ bindkey "^[[8~" end-of-line # End # HOWTO make your own: # bindkey '' (do this in a shell) # for some actions run `bindkey` + +# "cd......" ;) +rationalise-dot() { + if [[ $LBUFFER = *.. ]]; then + LBUFFER+=/.. + else + LBUFFER+=. + fi +} +zle -N rationalise-dot +bindkey . rationalise-dot + # }}} # Variables {{{ #export CDPATH=.:$HOME -- cgit v1.2.3-24-g4f1b