summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSuleyman Farajli <suleyman@farajli.net>2024-07-25 20:47:48 +0400
committerSuleyman Farajli <suleyman@farajli.net>2024-07-25 20:47:48 +0400
commitc1d8a66d924b2b64c8413a93b5876c1aa7cae8aa (patch)
treefacf644d5c17d68ac9ff99734a022fccf9180440
parent588967bcc3ba88a9ea66680462f29aea8a4715ea (diff)
lfrc: bug fix
-rw-r--r--config/lf/lfrc14
1 files 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
}}