From 8e183a37bffaf09ede4734672dda2f89cb558e67 Mon Sep 17 00:00:00 2001 From: Julian Prein Date: Thu, 23 Feb 2023 14:39:54 +0100 Subject: [PATCH] zsh:keys: Bind `^U` to `cd ..` I do not use readline/emacs(?) mapping to clear the line with ^U anyways as I have my beloved vim bindings. --- .config/zsh/zshrc.d/60-keys.zsh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.config/zsh/zshrc.d/60-keys.zsh b/.config/zsh/zshrc.d/60-keys.zsh index 0e6e208..80009cd 100644 --- a/.config/zsh/zshrc.d/60-keys.zsh +++ b/.config/zsh/zshrc.d/60-keys.zsh @@ -210,6 +210,14 @@ function go-shcwd { zle -N go-shcwd bindkey '^G' go-shcwd +# move one directory up on ^U (mnemonic: 'Up') +function cd-up { + pushd -q .. + redraw-prompt +} +zle -N cd-up +bindkey '^U' cd-up + ## History # Ctrl-Up bindkey '^[[1;5A' fzf-history-widget