diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2022-03-14 17:31:20 +0100 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2022-03-14 17:31:20 +0100 |
commit | 8f6be4a9861d29cd189b07f332a56cb83bd86abd (patch) | |
tree | 939dee5ffc664dab13293551022ede10a1ffdffa /.config/zsh/.zshrc | |
parent | Update (diff) | |
download | dotfiles-bsd-8f6be4a9861d29cd189b07f332a56cb83bd86abd.tar.gz dotfiles-bsd-8f6be4a9861d29cd189b07f332a56cb83bd86abd.tar.bz2 dotfiles-bsd-8f6be4a9861d29cd189b07f332a56cb83bd86abd.tar.xz dotfiles-bsd-8f6be4a9861d29cd189b07f332a56cb83bd86abd.tar.zst dotfiles-bsd-8f6be4a9861d29cd189b07f332a56cb83bd86abd.zip |
In progress
Diffstat (limited to '.config/zsh/.zshrc')
-rw-r--r-- | .config/zsh/.zshrc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index a437d68..977be7b 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -81,6 +81,18 @@ globalias() { zle -N globalias +# Use lf to switch directories and bind it to ctrl-o +lfcd () { + tmp="$(mktemp)" + lf -last-dir-path="$tmp" "$@" + if [ -f "$tmp" ]; then + dir="$(cat "$tmp")" + rm -f "$tmp" >/dev/null + [ -d "$dir" ] && [ "$dir" != "$(pwd)" ] && cd "$dir" + fi +} +bindkey -s '^o' '^ulfcd\n' + bindkey -v "^ " globalias bindkey -v " " magic-space bindkey -M isearch " " magic-space |