diff --git a/dots/lf/lfrc b/dots/lf/lfrc index d67038a..03d6e2e 100644 --- a/dots/lf/lfrc +++ b/dots/lf/lfrc @@ -114,16 +114,15 @@ cmd recol %{{ #cmd trash %set -f; mv $fx ~/.trash # $f: single file, $fx: multiple files -# https://github.com/gokcehan/lf/issues/45#issuecomment-260347057 cmd trash %tp.sh "$fx" -# IFS=':'; echo $fs | tr " " "\n" - +# https://github.com/gokcehan/lf/issues/45#issuecomment-260347057 +# https://unix.stackexchange.com/questions/617576/read-from-terminal-without-waiting-for-enter cmd trash-confirm ${{ echo 'file(s) selected:' echo $fx echo 'delete? [y/n]' - read ans + read -n1 ans [ $ans = 'y' ] && (echo 'deleting files…' && trash %tp.sh "$fx") || echo 'cancelled…' }}