summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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