From c1d8a66d924b2b64c8413a93b5876c1aa7cae8aa Mon Sep 17 00:00:00 2001 From: Suleyman Farajli Date: Thu, 25 Jul 2024 20:47:48 +0400 Subject: lfrc: bug fix --- config/lf/lfrc | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/config/lf/lfrc b/config/lf/lfrc index ebfffa3..b478965 100644 --- a/config/lf/lfrc +++ b/config/lf/lfrc @@ -16,7 +16,7 @@ map x $$f # execute current file (must be executable) map zb :{{ set sortby natural; set info size; set preview; set ratios 5:2; }} map zz :{{ set preview; set ratios 1:2:3; }} -# Directory change +# Directory change map gp cd ~/proj map gt cd ~/testProj map gc cd ~/.config @@ -38,7 +38,13 @@ set promptfmt "\033[48;1;234m %w/%f" cmd trash !{{ [ ! -d ~/.trash ] && mkdir -p ~/.trash - set -f - printf "\nItems to be trashed:\n$fx\n\nTrash? [y/N]" && read ans - [ $ans == "y" ] && mv $fx ~/.trash && echo "Trash complete!" || echo "Failed! Use y to trash." + printf "\nItems to be trashed:\n$fx\n\nTrash? [y/N]" + read ans + + if [ "${ans}" = "y" ];then + mv "${fx}" ~/.trash + echo "Trash complete!" + else + echo "Failed! Use y to trash." + fi }} -- cgit v1.2.3