add user defined options (#865)

This commit is contained in:
Christian Zangl authored and GitHub committed 2022-10-15 15:50:21 +03:00
1 parent 62621736b3
commit a2fed6d16e
6 files changed
+36 -1

No files matched your search

+8
View File
@@ -179,6 +179,7 @@ The following options can be used to customize the behavior of lf:
waitmsg string (default 'Press any key to continue')
wrapscan bool (default on)
wrapscroll bool (default off)
user_{key} string (default none)
.EE
.PP
The following environment variables are exported for shell commands:
@@ -196,6 +197,7 @@ The following environment variables are exported for shell commands:
PAGER
SHELL
lf_{option}
lf_user_{key}
.EE
.PP
The following special shell commands are used to customize the behavior of lf when defined:
@@ -990,6 +992,12 @@ Searching can wrap around the file list.
.EE
.PP
Scrolling can wrap around the file list.
.PP
.EX
user_{key} string (default none)
.EE
.PP
Any option that is prefixed with 'user_' is a user defined option and can be set to any string. Inside a user defined command the value will be provided in the `lf_user_{key}` environment variable. These options are not used by lf and are not persisted.
.SH ENVIRONMENT VARIABLES
The following variables are exported for shell commands: These are referred with a '$' prefix on POSIX shells (e.g. '$f'), between '%' characters on Windows cmd (e.g. '%f%'), and with a '$env:' prefix on Windows powershell (e.g. '$env:f').
.PP