commit d3d423edec69fd07db599bc7f70073d73f338e27
parent a3b50192ab6786778f3a280337a785781e5d82ac
Author: Alex Balgavy <a.balgavy@gmail.com>
Date: Wed, 21 Oct 2020 11:24:40 +0200
lf: empty trash and edit multiple files
Former-commit-id: 01526c9786a2d1d4ee0cf2336b791fe93514ecb2
Diffstat:
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/lf/lfrc b/lf/lfrc
@@ -152,6 +152,14 @@ cmd trash %{{
esac
done
}}
+cmd trashempty %{{
+ printf "Empty trash? [Y/n] "
+ read -r ans
+ case "$ans" in
+ Y*|y*) trash -ey; printf "Emptied.\n";;
+ *) printf "Not emptying.\n";;
+ esac
+}}
# }}}
# Mappings {{{
# execute current file (must be executable)
@@ -181,7 +189,7 @@ map g? $lf -doc | $PAGER; clear
map R push :rename<space>
map cw push :rename<space>
-map E $$EDITOR $f
+map E $$EDITOR $fx
map D trash
map <enter> open $fx
map S shell