add example remove command

This commit is contained in:
Gokcehan 2017-02-11 16:28:45 +03:00
parent de1168fb96
commit 96797f2487
3 changed files with 18 additions and 0 deletions

5
doc.go
View File

@ -317,6 +317,11 @@ followed by "put". These traditional names (e.g. "yank", "delete", and "put")
are picked instead of the other common convention (e.g. copy and cut) to
resemble the default keybinds for these operations.
By default, lf does not provide an actual file deletion command to protect new
users. You can define such a command and optionally assign a key if you like.
An example command to move selected files to a trash folder and remove files
completely are provided in the example configuration file.
Opening Files
You can use "open-file" command to open a file. This is a special command

View File

@ -331,6 +331,11 @@ followed by "put". These traditional names (e.g. "yank", "delete", and
"put") are picked instead of the other common convention (e.g. copy and cut)
to resemble the default keybinds for these operations.
By default, lf does not provide an actual file deletion command to protect
new users. You can define such a command and optionally assign a key if you
like. An example command to move selected files to a trash folder and remove
files completely are provided in the example configuration file.
Opening Files

View File

@ -88,6 +88,14 @@ $mkdir -p $HOME/.trash
# (see 'man mv' or 'mv --help' for backup options)
cmd trash $IFS=':'; mv --backup=numbered $fx $HOME/.trash
# remove current file or selected files (prompting)
#cmd remove ${{
# echo "$fx" | tr ':' '\n'
# echo -n 'remove?[y/n]'
# read ans
# [ $ans = 'y' ] && (IFS=':'; rm -rf $fx)
#}}
# extract the current file with the right command
# (xkcd link: https://xkcd.com/1168/)
cmd extract ${{