diff --git a/dots/lf/lfrc b/dots/lf/lfrc index f8d376b..5255a41 100644 --- a/dots/lf/lfrc +++ b/dots/lf/lfrc @@ -36,7 +36,8 @@ set cleaner ctpvclear # -------------------- # map # -------------------- -map trash # use '' key for 'trash' +map :push trash-confirm # use '' key for 'trash' +#map trash # use '' key for 'trash' map shell # use enter for shell commands map :unselect; clear # clear all selected map ` !true # show the result of execution of previous commands @@ -113,7 +114,14 @@ cmd recol %{{ # (also see 'man mv' for backup/overwrite options) #cmd trash %set -f; mv $fx ~/.trash # $f: single file, $fx: multiple files -cmd trash %tp.sh "$fx" +# https://github.com/gokcehan/lf/issues/45#issuecomment-260347057 +#cmd trash %tp.sh "$fx" + +map trash-confirm ${{ + echo 'delete?[y/n]' + read ans + [ $ans = 'y' ] && trash %tp.sh "$fx" || echo 'cancelled' +}} # extract the current file with the right command (https://xkcd.com/1168/) cmd extract %extract.sh "$f"