summaryrefslogtreecommitdiff
path: root/config/essentials/shell/functions.sh
diff options
context:
space:
mode:
Diffstat (limited to 'config/essentials/shell/functions.sh')
-rw-r--r--config/essentials/shell/functions.sh7
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"