diff options
author | Kjetil Ørbekk <kj@orbekk.com> | 2020-10-22 15:26:12 -0400 |
---|---|---|
committer | Kjetil Ørbekk <kj@orbekk.com> | 2020-10-22 15:26:12 -0400 |
commit | 83eb32ac62d51ce639c84a09c9b0a8f31fa13c11 (patch) | |
tree | 2cd9c8922f3f5031708c245618be31cd05cfaa7c /zsh | |
parent | f824666f35ca05d15a174200f99678b047b729cb (diff) |
Change zshrc
Diffstat (limited to 'zsh')
-rw-r--r-- | zsh/.zshrc | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -65,6 +65,24 @@ if [[ ! -f ~/.zsh/fast-syntax-highlighting/current_theme.zsh ]]; then fast-theme clean fi +# allow editing of command line +autoload -U edit-command-line +zle -N edit-command-line +bindkey "^V" edit-command-line + +function get-parent-dir() { + words=(${(z)LBUFFER}) + if [[ "${words[${#words}]}" = /* ]]; then + # There is already a path thing here. + words[${#words}]="${words[${#words}]:h}/" # Parent directory. + else + words=($words $PWD) + fi + LBUFFER="${words[@]}" +} +zle -N get-parent-dir +bindkey "^[u" get-parent-dir + source ~/.zshrc.local # To customize prompt, run `p10k configure` or edit ~/.p10k.zsh. |