From 948f5ef3d43c61bc01d606fa27d5046588051a6f Mon Sep 17 00:00:00 2001 From: krisdoodle45 <86745210+krisdoodle45@users.noreply.github.com> Date: Sun, 12 Sep 2021 21:38:25 +0200 Subject: [PATCH] Return the shortcut name for ease of use --- .config/lf/lfrc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.config/lf/lfrc b/.config/lf/lfrc index fb236256..d1b1a6d2 100644 --- a/.config/lf/lfrc +++ b/.config/lf/lfrc @@ -52,7 +52,7 @@ cmd moveto ${{ clear; tput cup $(($(tput lines)/3)); tput bold set -f clear; echo "Move to where?" - dest="$(awk '{ gsub(/#.*/, ""); } !/^$/ { print $2 }' ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs | fzf)" && + dest="$(awk '{ gsub(/#.*/, ""); } !/^$/ { print }' ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs | fzf | sed "s/.* //")" && for x in $fx; do eval mv -iv \"$x\" \"$dest\" done && @@ -63,7 +63,7 @@ cmd copyto ${{ clear; tput cup $(($(tput lines)/3)); tput bold set -f clear; echo "Copy to where?" - dest="$(awk '{ gsub(/#.*/, ""); } !/^$/ { print $2 }' ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs | fzf)" && + dest="$(awk '{ gsub(/#.*/, ""); } !/^$/ { print }' ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs | fzf | sed "s/.* //")" && for x in $fx; do eval cp -ivr \"$x\" \"$dest\" done && @@ -75,7 +75,7 @@ cmd bulkrename $vidir # Bindings map $lf -remote "send $id select '$(fzf)'" -map J $lf -remote "send $id cd $(awk '{ gsub(/#.*/, ""); } !/^$/ { print $2 }' ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs | fzf | sed "s/.*\$HOME/\$HOME/ ; s/}//" | envsubst)" +map J $lf -remote "send $id cd $(awk '{ gsub(/#.*/, ""); } !/^$/ { print }' ${XDG_CONFIG_HOME:-$HOME/.config}/shell/bm-dirs | fzf | sed "s/.* // ; s/.*\$HOME/\$HOME/ ; s/}//" | envsubst)" map gh map g top map D delete