/+ trash confirm
wip
This commit is contained in:
12
dots/lf/lfrc
12
dots/lf/lfrc
@@ -36,7 +36,8 @@ set cleaner ctpvclear
|
||||
# --------------------
|
||||
# map
|
||||
# --------------------
|
||||
map <delete> trash # use '<delete>' key for 'trash'
|
||||
map <delete> :push trash-confirm # use '<delete>' key for 'trash'
|
||||
#map <delete> trash # use '<delete>' key for 'trash'
|
||||
map <enter> shell # use enter for shell commands
|
||||
map <esc> :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"
|
||||
|
||||
Reference in New Issue
Block a user