diff options
author | Raymaekers Luca <raymaekers.luca@gmail.com> | 2024-10-01 13:38:32 +0200 |
---|---|---|
committer | Raymaekers Luca <raymaekers.luca@gmail.com> | 2024-10-01 13:38:32 +0200 |
commit | 04fbc2ddae298b048cc5449045527bd717ba94be (patch) | |
tree | c50bbb72d1ae944d4bd0c6316644fc33553e9b8e /config/essentials/shell/functions.sh | |
parent | d7845cdced852478e73cbd8f4b52dfc42da9c668 (diff) | |
parent | 53ab3784fad41b1a57acc5d09ec1899a6d273db0 (diff) |
Merge branch 'main' of db:dotfiles
Diffstat (limited to 'config/essentials/shell/functions.sh')
-rw-r--r-- | config/essentials/shell/functions.sh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/config/essentials/shell/functions.sh b/config/essentials/shell/functions.sh index 7dd14cf..1413fd8 100644 --- a/config/essentials/shell/functions.sh +++ b/config/essentials/shell/functions.sh @@ -340,7 +340,12 @@ ffconcat () { ffmpeg -y -f concat -safe 0 -i $tmp -c copy "$1" rm $tmp } -nvim_bindings() { "$(tmp="$(mktemp)"; nvim +":set nomore | :redir! > $tmp | :map | :redir END | :q" ; fzf < "$tmp"; rm "$tmp")"; } +nvim_bindings() { + tmp="$(mktemp)" + nvim +":set nomore | :redir! > $tmp | :map | :redir END | :q" > /dev/null + eval "nvim $(fzf < "$tmp" | awk '{print $NF}' | cut -f1 -d'>' | sed 's/:/ +/')" + rm "$tmp" +} prj () { pfx="$HOME/proj" |