summaryrefslogtreecommitdiffstats
path: root/.zshrc
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xssn.at>2009-09-06 12:58:18 +0200
committerFlorian Pritz <bluewind@xssn.at>2009-09-06 12:58:18 +0200
commitc3ec2a49a89233234036137860a2b7a1c5d54b80 (patch)
treec04e60dbe542e377b42f288c8ddaf5d85605899d /.zshrc
parent0ee11d92333b2e2fd23b8a793b333f087f76931b (diff)
downloaddotfiles-c3ec2a49a89233234036137860a2b7a1c5d54b80.tar.gz
dotfiles-c3ec2a49a89233234036137860a2b7a1c5d54b80.tar.xz
zshrc: new keybinding for .....
Signed-off-by: Florian Pritz <bluewind@xssn.at>
Diffstat (limited to '.zshrc')
-rw-r--r--.zshrc12
1 files changed, 12 insertions, 0 deletions
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 '<crtl+alt+key>' <action> (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