Update documentation (#2149)
* Fix typos * Unify spelling * Improve grammar and wording * Update usage of `filename` and `file name` * Prefer `without` over `w/o` * Generate docs
This commit is contained in:
1 parent
d2e125d264
commit
c5075b6455
3 files changed
+182
-186
No files matched your search
@@ -10,7 +10,7 @@ lf - terminal file manager
|
|||||||
[**-cpuprofile** *path*]
|
[**-cpuprofile** *path*]
|
||||||
[**-doc**]
|
[**-doc**]
|
||||||
[**-last-dir-path** *path*]
|
[**-last-dir-path** *path*]
|
||||||
[**-log path**]
|
[**-log** *path*]
|
||||||
[**-memprofile** *path*]
|
[**-memprofile** *path*]
|
||||||
[**-print-last-dir**]
|
[**-print-last-dir**]
|
||||||
[**-print-selection**]
|
[**-print-selection**]
|
||||||
@@ -315,7 +315,7 @@ If the `mouse` option is enabled, mouse buttons have the following default effec
|
|||||||
Click on a file or directory to select it.
|
Click on a file or directory to select it.
|
||||||
|
|
||||||
Right mouse button
|
Right mouse button
|
||||||
Enter a directory or open a file. Also works on the preview window.
|
Enter a directory or open a file. Also works on the preview pane.
|
||||||
|
|
||||||
Scroll wheel
|
Scroll wheel
|
||||||
Move up or down. If Ctrl is pressed, scroll up or down.
|
Move up or down. If Ctrl is pressed, scroll up or down.
|
||||||
@@ -503,7 +503,7 @@ Read a shell command to execute piping its standard I/O to the bottom statline.
|
|||||||
|
|
||||||
## shell-wait (modal) (default `!`)
|
## shell-wait (modal) (default `!`)
|
||||||
|
|
||||||
Read a shell command to execute and wait for a key press in the end.
|
Read a shell command to execute and wait for a key press at the end.
|
||||||
|
|
||||||
## shell-async (modal) (default `&`)
|
## shell-async (modal) (default `&`)
|
||||||
|
|
||||||
@@ -511,11 +511,11 @@ Read a shell command to execute asynchronously without standard I/O.
|
|||||||
|
|
||||||
## find (modal) (default `f`), find-back (modal) (default `F`), find-next (default `;`), find-prev (default `,`)
|
## find (modal) (default `f`), find-back (modal) (default `F`), find-next (default `;`), find-prev (default `,`)
|
||||||
|
|
||||||
Read key(s) to find the appropriate file name match in the forward/backward direction and jump to the next/previous match.
|
Read key(s) to find the appropriate filename match in the forward/backward direction and jump to the next/previous match.
|
||||||
|
|
||||||
## search (default `/`), search-back (default `?`), search-next (default `n`), search-prev (default `N`)
|
## search (default `/`), search-back (default `?`), search-next (default `n`), search-prev (default `N`)
|
||||||
|
|
||||||
Read a pattern to search for a file name match in the forward/backward direction and jump to the next/previous match.
|
Read a pattern to search for a filename match in the forward/backward direction and jump to the next/previous match.
|
||||||
|
|
||||||
## filter (modal), setfilter
|
## filter (modal), setfilter
|
||||||
|
|
||||||
@@ -543,7 +543,7 @@ You can define a new tag-clearing command by combining `tag` with `tag-toggle` (
|
|||||||
|
|
||||||
## tag-toggle (default `t`)
|
## tag-toggle (default `t`)
|
||||||
|
|
||||||
Tag a file with `*` or a single width character given in the argument if the file is untagged, otherwise remove the tag.
|
Tag a file with `*` or a single-width character given in the argument if the file is untagged, otherwise remove the tag.
|
||||||
|
|
||||||
## echo
|
## echo
|
||||||
|
|
||||||
@@ -629,7 +629,7 @@ When the cursor is at the first character in `:` mode, pressing one of the keys
|
|||||||
You can go back with `cmd-delete-back` (`<backspace>` by default).
|
You can go back with `cmd-delete-back` (`<backspace>` by default).
|
||||||
|
|
||||||
The command line commands should be mostly compatible with readline keybindings.
|
The command line commands should be mostly compatible with readline keybindings.
|
||||||
A character refers to a Unicode code point, a word consists of letters and digits, and a unix word consists of any non-blank characters.
|
A character refers to a Unicode code point, a word consists of letters and digits, and a Unix word consists of any non-blank characters.
|
||||||
|
|
||||||
## cmd-insert
|
## cmd-insert
|
||||||
|
|
||||||
@@ -689,7 +689,7 @@ Delete everything up to the beginning/end of the line.
|
|||||||
|
|
||||||
## cmd-delete-unix-word (default `<c-w>`)
|
## cmd-delete-unix-word (default `<c-w>`)
|
||||||
|
|
||||||
Delete the previous unix word.
|
Delete the previous Unix word.
|
||||||
|
|
||||||
## cmd-yank (default `<c-y>`)
|
## cmd-yank (default `<c-y>`)
|
||||||
|
|
||||||
@@ -722,7 +722,7 @@ Character `:` is used as the separator for list options `[]int` and `[]string`.
|
|||||||
|
|
||||||
## anchorfind (bool) (default true)
|
## anchorfind (bool) (default true)
|
||||||
|
|
||||||
When this option is enabled, the find command starts matching patterns from the beginning of file names, otherwise, it can match at an arbitrary position.
|
When this option is enabled, the find command starts matching patterns from the beginning of filenames, otherwise, it can match at an arbitrary position.
|
||||||
|
|
||||||
## autoquit (bool) (default true)
|
## autoquit (bool) (default true)
|
||||||
|
|
||||||
@@ -737,14 +737,14 @@ Format string of the box drawing characters enabled by the `drawbox` option.
|
|||||||
Set the path of a cleaner file.
|
Set the path of a cleaner file.
|
||||||
The file should be executable.
|
The file should be executable.
|
||||||
This file is called if previewing is enabled, the previewer is set, and the previously selected file has its preview cache disabled.
|
This file is called if previewing is enabled, the previewer is set, and the previously selected file has its preview cache disabled.
|
||||||
The following arguments are passed to the file, (1) current file name, (2) width, (3) height, (4) horizontal position, (5) vertical position of preview pane and (6) next file name to be previewed respectively.
|
The following arguments are passed to the file, (1) current filename, (2) width, (3) height, (4) horizontal position, (5) vertical position of preview pane and (6) next filename to be previewed respectively.
|
||||||
Preview cleaning is disabled when the value of this option is left empty.
|
Preview cleaning is disabled when the value of this option is left empty.
|
||||||
|
|
||||||
## copyfmt (string) (default `\033[7;33m`)
|
## copyfmt (string) (default `\033[7;33m`)
|
||||||
|
|
||||||
Format string of the indicator for files to be copied.
|
Format string of the indicator for files to be copied.
|
||||||
|
|
||||||
## cursoractivefmt (string) (default `\033[7m`), cursorparentfmt string (default `\033[7m`), cursorpreviewfmt string (default `\033[4m`)
|
## cursoractivefmt (string) (default `\033[7m`), cursorparentfmt (string) (default `\033[7m`), cursorpreviewfmt (string) (default `\033[4m`)
|
||||||
|
|
||||||
Format strings for highlighting the cursor.
|
Format strings for highlighting the cursor.
|
||||||
`cursoractivefmt` applies in the current directory pane,
|
`cursoractivefmt` applies in the current directory pane,
|
||||||
@@ -789,8 +789,8 @@ Draw boxes around panes with box drawing characters.
|
|||||||
|
|
||||||
## dupfilefmt (string) (default `%f.~%n~`)
|
## dupfilefmt (string) (default `%f.~%n~`)
|
||||||
|
|
||||||
Format string of file name when creating duplicate files. With the default format, copying a file `abc.txt` to the same directory will result in a duplicate file called `abc.txt.~1~`.
|
Format string of filename when creating duplicate files. With the default format, copying a file `abc.txt` to the same directory will result in a duplicate file called `abc.txt.~1~`.
|
||||||
Special expansions are provided, `%f` as the file name, `%b` for the basename (file name without extension), `%e` as the extension (including the dot) and `%n` as the number of duplicates.
|
Special expansions are provided, `%f` as the file name, `%b` for the base name (file name without extension), `%e` as the extension (including the dot) and `%n` as the number of duplicates.
|
||||||
|
|
||||||
## errorfmt (string) (default `\033[7;31;47m`)
|
## errorfmt (string) (default `\033[7;31;47m`)
|
||||||
|
|
||||||
@@ -924,7 +924,7 @@ Files containing the null character (U+0000) in the read portion are considered
|
|||||||
|
|
||||||
Set the path of a previewer file to filter the content of regular files for previewing.
|
Set the path of a previewer file to filter the content of regular files for previewing.
|
||||||
The file should be executable.
|
The file should be executable.
|
||||||
The following arguments are passed to the file, (1) current file name, (2) width, (3) height, (4) horizontal position, and (5) vertical position of preview pane respectively.
|
The following arguments are passed to the file, (1) current filename, (2) width, (3) height, (4) horizontal position, and (5) vertical position of preview pane respectively.
|
||||||
SIGPIPE signal is sent when enough lines are read.
|
SIGPIPE signal is sent when enough lines are read.
|
||||||
If the previewer returns a non-zero exit code, then the preview cache for the given file is disabled.
|
If the previewer returns a non-zero exit code, then the preview cache for the given file is disabled.
|
||||||
This means that if the file is selected in the future, the previewer is called once again.
|
This means that if the file is selected in the future, the previewer is called once again.
|
||||||
@@ -933,7 +933,7 @@ Preview filtering is disabled and files are displayed as they are when the value
|
|||||||
## promptfmt (string) (default `\033[32;1m%u@%h\033[0m:\033[34;1m%d\033[0m\033[1m%f\033[0m`)
|
## promptfmt (string) (default `\033[32;1m%u@%h\033[0m:\033[34;1m%d\033[0m\033[1m%f\033[0m`)
|
||||||
|
|
||||||
Format string of the prompt shown in the top line.
|
Format string of the prompt shown in the top line.
|
||||||
Special expansions are provided, `%u` as the user name, `%h` as the hostname, `%w` as the working directory, `%d` as the working directory with a trailing path separator, `%f` as the file name, and `%F` as the current filter. `%S` may be used once and will provide a spacer so that the following parts are right aligned on the screen.
|
Special expansions are provided, `%u` as the user name, `%h` as the hostname, `%w` as the working directory, `%d` as the working directory with a trailing path separator, `%f` as the filename, and `%F` as the current filter. `%S` may be used once and will provide a spacer so that the following parts are right-aligned on the screen.
|
||||||
The home folder is shown as `~` in the working directory expansion.
|
The home folder is shown as `~` in the working directory expansion.
|
||||||
Directory names are automatically shortened to a single character starting from the leftmost parent when the prompt does not fit the screen.
|
Directory names are automatically shortened to a single character starting from the leftmost parent when the prompt does not fit the screen.
|
||||||
|
|
||||||
@@ -967,13 +967,13 @@ The `|` character splits the format string into sections. Any section containing
|
|||||||
## scrolloff (int) (default 0)
|
## scrolloff (int) (default 0)
|
||||||
|
|
||||||
Minimum number of offset lines shown at all times at the top and bottom of the screen when scrolling.
|
Minimum number of offset lines shown at all times at the top and bottom of the screen when scrolling.
|
||||||
The current line is kept in the middle when this option is set to a large value that is bigger than the half of number of lines.
|
The current line is kept in the middle when this option is set to a large value that is bigger than half the number of lines.
|
||||||
A smaller offset can be used when the current file is close to the beginning or end of the list to show the maximum number of items.
|
A smaller offset can be used when the current file is close to the beginning or end of the list to show the maximum number of items.
|
||||||
|
|
||||||
## searchmethod (string) default `text`)
|
## searchmethod (string) (default `text`)
|
||||||
|
|
||||||
How search command patterns are treated.
|
How search command patterns are treated.
|
||||||
Currently supported methods are `text` (i.e. string literals), `glob` (i.e shell globs) and `regex` (i.e. regular expressions).
|
Currently supported methods are `text` (i.e. string literals), `glob` (i.e. shell globs) and `regex` (i.e. regular expressions).
|
||||||
See `SEARCHING FILES` for more details.
|
See `SEARCHING FILES` for more details.
|
||||||
|
|
||||||
## selectfmt (string) (default `\033[7;35m`)
|
## selectfmt (string) (default `\033[7;35m`)
|
||||||
@@ -1064,7 +1064,7 @@ Format string of the file modification time shown in the bottom line.
|
|||||||
|
|
||||||
## truncatechar (string) (default `~`)
|
## truncatechar (string) (default `~`)
|
||||||
|
|
||||||
The truncate character that is shown at the end when the file name does not fit into the pane.
|
The truncate character that is shown at the end when the filename does not fit into the pane.
|
||||||
|
|
||||||
## truncatepct (int) (default 100)
|
## truncatepct (int) (default 100)
|
||||||
|
|
||||||
@@ -1151,7 +1151,7 @@ For example, with POSIX shells, you can use `[ -n "$LF_LEVEL" ] && PS1="$PS1""(l
|
|||||||
|
|
||||||
## OPENER
|
## OPENER
|
||||||
|
|
||||||
If this variable is set in the environment, use the same value. Otherwise, this is set to `start` in Windows, `open` in MacOS, `xdg-open` in others.
|
If this variable is set in the environment, use the same value. Otherwise, this is set to `start` in Windows, `open` in macOS, `xdg-open` in others.
|
||||||
|
|
||||||
## EDITOR
|
## EDITOR
|
||||||
|
|
||||||
@@ -1256,7 +1256,7 @@ This shell command can be defined to be executed before quitting.
|
|||||||
|
|
||||||
The following command prefixes are used by lf:
|
The following command prefixes are used by lf:
|
||||||
|
|
||||||
: read (default) builtin/custom command
|
: read (default) built-in/custom command
|
||||||
$ shell shell command
|
$ shell shell command
|
||||||
% shell-pipe shell command running with the UI
|
% shell-pipe shell command running with the UI
|
||||||
! shell-wait shell command waiting for a key press
|
! shell-wait shell command waiting for a key press
|
||||||
@@ -1284,8 +1284,8 @@ Command `set` is used to set an option which can be a boolean, integer, or strin
|
|||||||
set hidden false # boolean disable
|
set hidden false # boolean disable
|
||||||
set hidden! # boolean toggle
|
set hidden! # boolean toggle
|
||||||
set scrolloff 10 # integer value
|
set scrolloff 10 # integer value
|
||||||
set sortby time # string value w/o quotes
|
set sortby time # string value without quotes
|
||||||
set sortby 'time' # string value with single quotes (whitespaces)
|
set sortby 'time' # string value with single quotes (whitespace)
|
||||||
set sortby "time" # string value with double quotes (backslash escapes)
|
set sortby "time" # string value with double quotes (backslash escapes)
|
||||||
|
|
||||||
Command `setlocal` is used to set a local option for a directory which can be a boolean or string.
|
Command `setlocal` is used to set a local option for a directory which can be a boolean or string.
|
||||||
@@ -1297,15 +1297,15 @@ Adding a trailing path separator (i.e. `/` for Unix and `\` for Windows) sets th
|
|||||||
setlocal /foo/bar nohidden # boolean disable
|
setlocal /foo/bar nohidden # boolean disable
|
||||||
setlocal /foo/bar hidden false # boolean disable
|
setlocal /foo/bar hidden false # boolean disable
|
||||||
setlocal /foo/bar hidden! # boolean toggle
|
setlocal /foo/bar hidden! # boolean toggle
|
||||||
setlocal /foo/bar sortby time # string value w/o quotes
|
setlocal /foo/bar sortby time # string value without quotes
|
||||||
setlocal /foo/bar sortby 'time' # string value with single quotes (whitespaces)
|
setlocal /foo/bar sortby 'time' # string value with single quotes (whitespace)
|
||||||
setlocal /foo/bar sortby "time" # string value with double quotes (backslash escapes)
|
setlocal /foo/bar sortby "time" # string value with double quotes (backslash escapes)
|
||||||
setlocal /foo/bar hidden # for only '/foo/bar' directory
|
setlocal /foo/bar hidden # for only '/foo/bar' directory
|
||||||
setlocal /foo/bar/ hidden # for '/foo/bar' and its subdirectories (e.g. '/foo/bar/baz')
|
setlocal /foo/bar/ hidden # for '/foo/bar' and its subdirectories (e.g. '/foo/bar/baz')
|
||||||
|
|
||||||
Command `map` is used to bind a key in Normal and Visual mode to a command which can be a builtin command, custom command, or shell command:
|
Command `map` is used to bind a key in Normal and Visual mode to a command which can be a built-in command, custom command, or shell command:
|
||||||
|
|
||||||
map gh cd ~ # builtin command
|
map gh cd ~ # built-in command
|
||||||
map D trash # custom command
|
map D trash # custom command
|
||||||
map i $less $f # shell command
|
map i $less $f # shell command
|
||||||
map U !du -csh * # waiting shell command
|
map U !du -csh * # waiting shell command
|
||||||
@@ -1362,7 +1362,7 @@ Regular keys are assigned to a command with the usual syntax:
|
|||||||
|
|
||||||
map a down
|
map a down
|
||||||
|
|
||||||
Keys combined with the shift key simply use the uppercase letter:
|
Keys combined with the Shift key simply use the uppercase letter:
|
||||||
|
|
||||||
map A down
|
map A down
|
||||||
|
|
||||||
@@ -1379,19 +1379,19 @@ Function keys are prefixed with `f` character:
|
|||||||
|
|
||||||
map <f-1> down
|
map <f-1> down
|
||||||
|
|
||||||
Keys combined with the control key are prefixed with a `c` character:
|
Keys combined with the Ctrl key are prefixed with a `c` character:
|
||||||
|
|
||||||
map <c-a> down
|
map <c-a> down
|
||||||
|
|
||||||
Keys combined with the alt key are assigned in two different ways depending on the behavior of your terminal.
|
Keys combined with the Alt key are assigned in two different ways depending on the behavior of your terminal.
|
||||||
Older terminals (e.g. xterm) may set the 8th bit of a character when the alt key is pressed.
|
Older terminals (e.g. xterm) may set the 8th bit of a character when the Alt key is pressed.
|
||||||
On these terminals, you can use the corresponding byte for the mapping:
|
On these terminals, you can use the corresponding byte for the mapping:
|
||||||
|
|
||||||
map á down
|
map á down
|
||||||
|
|
||||||
Newer terminals (e.g. gnome-terminal) may prefix the key with an escape key when the alt key is pressed.
|
Newer terminals (e.g. gnome-terminal) may prefix the key with an escape character when the Alt key is pressed.
|
||||||
lf uses the escape delaying mechanism to recognize alt keys in these terminals (delay is 100ms).
|
lf uses the escape delaying mechanism to recognize Alt keys in these terminals (delay is 100ms).
|
||||||
On these terminals, keys combined with the alt key are prefixed with an `a` character:
|
On these terminals, keys combined with the Alt key are prefixed with an `a` character:
|
||||||
|
|
||||||
map <a-a> down
|
map <a-a> down
|
||||||
|
|
||||||
@@ -1491,18 +1491,18 @@ However, use of this option is highly recommended and it is assumed in the rest
|
|||||||
# PIPING SHELL COMMANDS
|
# PIPING SHELL COMMANDS
|
||||||
|
|
||||||
Regular shell commands have some limitations in some cases.
|
Regular shell commands have some limitations in some cases.
|
||||||
When an output or error message is given and the command exits afterwards, the ui is immediately resumed and there is no way to see the message without dropping to shell again.
|
When an output or error message is given and the command exits afterwards, the UI is immediately resumed and there is no way to see the message without dropping to shell again.
|
||||||
Also, even when there is no output or error, the UI still needs to be paused while the command is running.
|
Also, even when there is no output or error, the UI still needs to be paused while the command is running.
|
||||||
This can cause flickering on the screen for short commands and similar distractions for longer commands.
|
This can cause flickering on the screen for short commands and similar distractions for longer commands.
|
||||||
|
|
||||||
Instead of pausing the UI, piping shell commands connect stdin, stdout, and stderr of the command to the statline at the bottom of the UI.
|
Instead of pausing the UI, piping shell commands connect stdin, stdout, and stderr of the command to the statline at the bottom of the UI.
|
||||||
This can be useful for programs following the Unix philosophy to give no output in the success case, and brief error messages or prompts in other cases.
|
This can be useful for programs following the Unix philosophy to give no output in the success case, and brief error messages or prompts in other cases.
|
||||||
|
|
||||||
For example, following rename command prompts for overwrite in the statline if there is an existing file with the given name:
|
For example, the following rename command prompts for overwrite in the statline if there is an existing file with the given name:
|
||||||
|
|
||||||
cmd rename %mv -i $f $1
|
cmd rename %mv -i $f $1
|
||||||
|
|
||||||
You can also output error messages in the command and it will show up in the statline.
|
You can also output error messages in the command and they will show up in the statline.
|
||||||
For example, an alternative rename command may look like this:
|
For example, an alternative rename command may look like this:
|
||||||
|
|
||||||
cmd rename %[ -e $1 ] && printf "file exists" || mv $f $1
|
cmd rename %[ -e $1 ] && printf "file exists" || mv $f $1
|
||||||
@@ -1544,7 +1544,7 @@ You can optionally give it an ID number to send a command to a single client:
|
|||||||
|
|
||||||
lf -remote 'send 1234 echo hello world'
|
lf -remote 'send 1234 echo hello world'
|
||||||
|
|
||||||
All clients have a unique id number but you may not be aware of the id number when you are writing a command.
|
All clients have a unique ID number but you may not be aware of the ID number when you are writing a command.
|
||||||
For this purpose, an `$id` variable is exported to the environment for shell commands.
|
For this purpose, an `$id` variable is exported to the environment for shell commands.
|
||||||
The value of this variable is set to the process ID of the client.
|
The value of this variable is set to the process ID of the client.
|
||||||
You can use it to send a remote command from a client to the server which in return sends a command back to itself.
|
You can use it to send a remote command from a client to the server which in return sends a command back to itself.
|
||||||
@@ -1565,7 +1565,7 @@ For example, you can configure the number of columns in the UI with respect to t
|
|||||||
fi
|
fi
|
||||||
}}
|
}}
|
||||||
|
|
||||||
In addition, the `query` command can be used to obtain information about a specific lf instance by providing its id:
|
In addition, the `query` command can be used to obtain information about a specific lf instance by providing its ID:
|
||||||
|
|
||||||
lf -remote "query $id maps"
|
lf -remote "query $id maps"
|
||||||
|
|
||||||
@@ -1618,7 +1618,7 @@ Only file modes and (some) timestamps can be preserved (see `preserve` option),
|
|||||||
Special files such as character and block devices, named pipes, and sockets are skipped and links are not followed.
|
Special files such as character and block devices, named pipes, and sockets are skipped and links are not followed.
|
||||||
Moving is performed using the rename operation of the underlying OS.
|
Moving is performed using the rename operation of the underlying OS.
|
||||||
For cross-device moving, lf falls back to copying and then deletes the original files if there are no errors.
|
For cross-device moving, lf falls back to copying and then deletes the original files if there are no errors.
|
||||||
Operation errors are shown in the message line as well as the log file and they do not preemptively finish the corresponding file operation.
|
Operation errors are shown in the message line as well as the log file and they do not prematurely terminate the corresponding file operation.
|
||||||
|
|
||||||
File operations can be performed on the currently selected file or on multiple files by selecting them first.
|
File operations can be performed on the currently selected file or on multiple files by selecting them first.
|
||||||
When you `copy` a file, lf doesn't actually copy the file on the disk, but only records its name to a file.
|
When you `copy` a file, lf doesn't actually copy the file on the disk, but only records its name to a file.
|
||||||
@@ -1673,10 +1673,10 @@ You can set the number of keys to match using `findlen` option.
|
|||||||
If you set this value to zero, then the keys are read until there is only a single match.
|
If you set this value to zero, then the keys are read until there is only a single match.
|
||||||
The default values of these two options are set to jump to the first file with the given initial.
|
The default values of these two options are set to jump to the first file with the given initial.
|
||||||
|
|
||||||
Some options effect both searching and finding.
|
Some options affect both searching and finding.
|
||||||
You can disable `wrapscan` option to prevent searches from being wrapped around at the end of the file list.
|
You can disable `wrapscan` option to prevent searches from being wrapped around at the end of the file list.
|
||||||
You can disable `ignorecase` option to match cases in the pattern and the filename.
|
You can disable `ignorecase` option to match cases in the pattern and the filename.
|
||||||
This option is already automatically overridden if the pattern contains upper-case characters.
|
This option is already automatically overridden if the pattern contains uppercase characters.
|
||||||
You can disable `smartcase` option to disable this behavior.
|
You can disable `smartcase` option to disable this behavior.
|
||||||
Two similar options `ignoredia` and `smartdia` are provided to control matching diacritics in Latin letters.
|
Two similar options `ignoredia` and `smartdia` are provided to control matching diacritics in Latin letters.
|
||||||
|
|
||||||
@@ -1692,7 +1692,7 @@ It is possible to use different command types:
|
|||||||
|
|
||||||
cmd open &xdg-open $f
|
cmd open &xdg-open $f
|
||||||
|
|
||||||
You may want to use either file extensions or mime types from `file` command:
|
You may want to use either file extensions or MIME types from `file` command:
|
||||||
|
|
||||||
cmd open ${{
|
cmd open ${{
|
||||||
case $(file --mime-type -Lb $f) in
|
case $(file --mime-type -Lb $f) in
|
||||||
@@ -1726,11 +1726,11 @@ Possible options are `libfile-mimeinfo-perl` (executable name is `mimeopen`), `r
|
|||||||
|
|
||||||
lf previews files on the preview pane by printing the file until the end or until the preview pane is filled.
|
lf previews files on the preview pane by printing the file until the end or until the preview pane is filled.
|
||||||
This output can be enhanced by providing a custom preview script for filtering.
|
This output can be enhanced by providing a custom preview script for filtering.
|
||||||
This can be used to highlight source codes, list contents of archive files or view PDF or image files to name a few.
|
This can be used to highlight source code, list contents of archive files or view PDF or image files to name a few.
|
||||||
For coloring lf recognizes ANSI escape codes.
|
For coloring lf recognizes ANSI escape codes.
|
||||||
|
|
||||||
To use this feature, you need to set the value of `previewer` option to the path of an executable file.
|
To use this feature, you need to set the value of `previewer` option to the path of an executable file.
|
||||||
Five arguments are passed to the file, (1) current file name, (2) width, (3) height, (4) horizontal position, and (5) vertical position of preview pane respectively.
|
Five arguments are passed to the file, (1) current filename, (2) width, (3) height, (4) horizontal position, and (5) vertical position of preview pane respectively.
|
||||||
The output of the execution is printed in the preview pane.
|
The output of the execution is printed in the preview pane.
|
||||||
You may also want to use the same script in your pager mapping as well:
|
You may also want to use the same script in your pager mapping as well:
|
||||||
|
|
||||||
@@ -1743,7 +1743,7 @@ For `less` pager, you may instead utilize `LESSOPEN` mechanism so that useful in
|
|||||||
map i $LESSOPEN='| ~/.config/lf/pv.sh %s' less -R $f
|
map i $LESSOPEN='| ~/.config/lf/pv.sh %s' less -R $f
|
||||||
|
|
||||||
Since this script is called for each file selection change it needs to be as efficient as possible and this responsibility is left to the user.
|
Since this script is called for each file selection change it needs to be as efficient as possible and this responsibility is left to the user.
|
||||||
You may use file extensions to determine the type of file more efficiently compared to obtaining mime types from `file` command.
|
You may use file extensions to determine the type of file more efficiently compared to obtaining MIME types from `file` command.
|
||||||
Extensions can then be used to match cleanly within a conditional:
|
Extensions can then be used to match cleanly within a conditional:
|
||||||
|
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
@@ -1877,7 +1877,7 @@ It starts with a default color scheme and updates colors using values of existin
|
|||||||
Colors are set in the following order:
|
Colors are set in the following order:
|
||||||
|
|
||||||
1. default
|
1. default
|
||||||
2. LSCOLORS (Mac/BSD ls)
|
2. LSCOLORS (macOS/BSD ls)
|
||||||
3. LS_COLORS (GNU ls)
|
3. LS_COLORS (GNU ls)
|
||||||
4. LF_COLORS (lf specific)
|
4. LF_COLORS (lf specific)
|
||||||
5. colors file (lf specific)
|
5. colors file (lf specific)
|
||||||
@@ -1986,7 +1986,7 @@ You may instead divide it into multiple lines in between double quotes by escapi
|
|||||||
ex=01;32:\
|
ex=01;32:\
|
||||||
"
|
"
|
||||||
|
|
||||||
The `ln` entry supports the special value `target`, which will use the link target to select a style. File name rules will still apply based on the link's name -- this mirrors GNU's `ls` and `dircolors` behavior.
|
The `ln` entry supports the special value `target`, which will use the link target to select a style. Filename rules will still apply based on the link's name -- this mirrors GNU's `ls` and `dircolors` behavior.
|
||||||
Having such a long variable definition in a shell configuration file might be undesirable.
|
Having such a long variable definition in a shell configuration file might be undesirable.
|
||||||
You may instead use the colors file (refer to the [CONFIGURATION section](https://github.com/gokcehan/lf/blob/master/doc.md#configuration)) for configuration.
|
You may instead use the colors file (refer to the [CONFIGURATION section](https://github.com/gokcehan/lf/blob/master/doc.md#configuration)) for configuration.
|
||||||
A sample colors file can be found at
|
A sample colors file can be found at
|
||||||
@@ -1998,12 +1998,12 @@ https://en.wikipedia.org/wiki/ANSI_escape_code
|
|||||||
|
|
||||||
Icons are configured using `LF_ICONS` environment variable or an icons file (refer to the [CONFIGURATION section](https://github.com/gokcehan/lf/blob/master/doc.md#configuration)).
|
Icons are configured using `LF_ICONS` environment variable or an icons file (refer to the [CONFIGURATION section](https://github.com/gokcehan/lf/blob/master/doc.md#configuration)).
|
||||||
The variable uses the same syntax as `LS_COLORS/LF_COLORS`.
|
The variable uses the same syntax as `LS_COLORS/LF_COLORS`.
|
||||||
Instead of colors, you should put a single characters as values of entries.
|
Instead of colors, you should use single characters or symbols as values.
|
||||||
The `ln` entry supports the special value `target`, which will use the link target to select a icon. File name rules will still apply based on the link's name -- this mirrors GNU's `ls` and `dircolors` behavior.
|
The `ln` entry supports the special value `target`, which will use the link target to select a icon. Filename rules will still apply based on the link's name -- this mirrors GNU's `ls` and `dircolors` behavior.
|
||||||
The icons file (refer to the [CONFIGURATION section](https://github.com/gokcehan/lf/blob/master/doc.md#configuration)) should consist of whitespace-separated arrays with a `#` character to start comments until the end of the line.
|
The icons file (refer to the [CONFIGURATION section](https://github.com/gokcehan/lf/blob/master/doc.md#configuration)) should consist of whitespace-separated arrays with a `#` character to start comments until the end of the line.
|
||||||
Each line should contain 1-3 columns, first column is filetype or filename pattern, second column is the icon, third column is an optional icon color. If there is only one column, means to disable rule for this filetype or pattern.
|
Each line should contain 1-3 columns: a file type or file name pattern, the icon, and an optional icon color. Using only one column disables all rules for that type or name.
|
||||||
Do not forget to add `set icons true` to your `lfrc` to see the icons.
|
Do not forget to add `set icons true` to your `lfrc` to see the icons.
|
||||||
Default values are as follows given with their matching order in lf:
|
Default values are listed below in the order lf matches them:
|
||||||
|
|
||||||
ln l
|
ln l
|
||||||
or l
|
or l
|
||||||
|
|||||||
@@ -307,7 +307,7 @@ effects:
|
|||||||
Click on a file or directory to select it.
|
Click on a file or directory to select it.
|
||||||
|
|
||||||
Right mouse button
|
Right mouse button
|
||||||
Enter a directory or open a file. Also works on the preview window.
|
Enter a directory or open a file. Also works on the preview pane.
|
||||||
|
|
||||||
Scroll wheel
|
Scroll wheel
|
||||||
Move up or down. If Ctrl is pressed, scroll up or down.
|
Move up or down. If Ctrl is pressed, scroll up or down.
|
||||||
@@ -507,7 +507,7 @@ statline.
|
|||||||
|
|
||||||
shell-wait (modal) (default !)
|
shell-wait (modal) (default !)
|
||||||
|
|
||||||
Read a shell command to execute and wait for a key press in the end.
|
Read a shell command to execute and wait for a key press at the end.
|
||||||
|
|
||||||
shell-async (modal) (default &)
|
shell-async (modal) (default &)
|
||||||
|
|
||||||
@@ -515,12 +515,12 @@ Read a shell command to execute asynchronously without standard I/O.
|
|||||||
|
|
||||||
find (modal) (default f), find-back (modal) (default F), find-next (default ;), find-prev (default ,)
|
find (modal) (default f), find-back (modal) (default F), find-next (default ;), find-prev (default ,)
|
||||||
|
|
||||||
Read key(s) to find the appropriate file name match in the
|
Read key(s) to find the appropriate filename match in the
|
||||||
forward/backward direction and jump to the next/previous match.
|
forward/backward direction and jump to the next/previous match.
|
||||||
|
|
||||||
search (default /), search-back (default ?), search-next (default n), search-prev (default N)
|
search (default /), search-back (default ?), search-next (default n), search-prev (default N)
|
||||||
|
|
||||||
Read a pattern to search for a file name match in the forward/backward
|
Read a pattern to search for a filename match in the forward/backward
|
||||||
direction and jump to the next/previous match.
|
direction and jump to the next/previous match.
|
||||||
|
|
||||||
filter (modal), setfilter
|
filter (modal), setfilter
|
||||||
@@ -552,7 +552,7 @@ can define a new tag-clearing command by combining tag with tag-toggle
|
|||||||
|
|
||||||
tag-toggle (default t)
|
tag-toggle (default t)
|
||||||
|
|
||||||
Tag a file with * or a single width character given in the argument if
|
Tag a file with * or a single-width character given in the argument if
|
||||||
the file is untagged, otherwise remove the tag.
|
the file is untagged, otherwise remove the tag.
|
||||||
|
|
||||||
echo
|
echo
|
||||||
@@ -651,7 +651,7 @@ with cmd-delete-back (<backspace> by default).
|
|||||||
|
|
||||||
The command line commands should be mostly compatible with readline
|
The command line commands should be mostly compatible with readline
|
||||||
keybindings. A character refers to a Unicode code point, a word consists
|
keybindings. A character refers to a Unicode code point, a word consists
|
||||||
of letters and digits, and a unix word consists of any non-blank
|
of letters and digits, and a Unix word consists of any non-blank
|
||||||
characters.
|
characters.
|
||||||
|
|
||||||
cmd-insert
|
cmd-insert
|
||||||
@@ -715,7 +715,7 @@ Delete everything up to the beginning/end of the line.
|
|||||||
|
|
||||||
cmd-delete-unix-word (default <c-w>)
|
cmd-delete-unix-word (default <c-w>)
|
||||||
|
|
||||||
Delete the previous unix word.
|
Delete the previous Unix word.
|
||||||
|
|
||||||
cmd-yank (default <c-y>)
|
cmd-yank (default <c-y>)
|
||||||
|
|
||||||
@@ -751,8 +751,8 @@ Character : is used as the separator for list options []int and
|
|||||||
anchorfind (bool) (default true)
|
anchorfind (bool) (default true)
|
||||||
|
|
||||||
When this option is enabled, the find command starts matching patterns
|
When this option is enabled, the find command starts matching patterns
|
||||||
from the beginning of file names, otherwise, it can match at an
|
from the beginning of filenames, otherwise, it can match at an arbitrary
|
||||||
arbitrary position.
|
position.
|
||||||
|
|
||||||
autoquit (bool) (default true)
|
autoquit (bool) (default true)
|
||||||
|
|
||||||
@@ -768,16 +768,16 @@ cleaner (string) (default ``) (not called if empty)
|
|||||||
Set the path of a cleaner file. The file should be executable. This file
|
Set the path of a cleaner file. The file should be executable. This file
|
||||||
is called if previewing is enabled, the previewer is set, and the
|
is called if previewing is enabled, the previewer is set, and the
|
||||||
previously selected file has its preview cache disabled. The following
|
previously selected file has its preview cache disabled. The following
|
||||||
arguments are passed to the file, (1) current file name, (2) width, (3)
|
arguments are passed to the file, (1) current filename, (2) width, (3)
|
||||||
height, (4) horizontal position, (5) vertical position of preview pane
|
height, (4) horizontal position, (5) vertical position of preview pane
|
||||||
and (6) next file name to be previewed respectively. Preview cleaning is
|
and (6) next filename to be previewed respectively. Preview cleaning is
|
||||||
disabled when the value of this option is left empty.
|
disabled when the value of this option is left empty.
|
||||||
|
|
||||||
copyfmt (string) (default \033[7;33m)
|
copyfmt (string) (default \033[7;33m)
|
||||||
|
|
||||||
Format string of the indicator for files to be copied.
|
Format string of the indicator for files to be copied.
|
||||||
|
|
||||||
cursoractivefmt (string) (default \033[7m), cursorparentfmt string (default \033[7m), cursorpreviewfmt string (default \033[4m)
|
cursoractivefmt (string) (default \033[7m), cursorparentfmt (string) (default \033[7m), cursorpreviewfmt (string) (default \033[4m)
|
||||||
|
|
||||||
Format strings for highlighting the cursor. cursoractivefmt applies in
|
Format strings for highlighting the cursor. cursoractivefmt applies in
|
||||||
the current directory pane, cursorparentfmt applies in panes that show
|
the current directory pane, cursorparentfmt applies in panes that show
|
||||||
@@ -833,10 +833,10 @@ Draw boxes around panes with box drawing characters.
|
|||||||
|
|
||||||
dupfilefmt (string) (default %f.~%n~)
|
dupfilefmt (string) (default %f.~%n~)
|
||||||
|
|
||||||
Format string of file name when creating duplicate files. With the
|
Format string of filename when creating duplicate files. With the
|
||||||
default format, copying a file abc.txt to the same directory will result
|
default format, copying a file abc.txt to the same directory will result
|
||||||
in a duplicate file called abc.txt.~1~. Special expansions are provided,
|
in a duplicate file called abc.txt.~1~. Special expansions are provided,
|
||||||
%f as the file name, %b for the basename (file name without extension),
|
%f as the file name, %b for the base name (file name without extension),
|
||||||
%e as the extension (including the dot) and %n as the number of
|
%e as the extension (including the dot) and %n as the number of
|
||||||
duplicates.
|
duplicates.
|
||||||
|
|
||||||
@@ -986,8 +986,8 @@ previewer (string) (default ``) (not filtered if empty)
|
|||||||
|
|
||||||
Set the path of a previewer file to filter the content of regular files
|
Set the path of a previewer file to filter the content of regular files
|
||||||
for previewing. The file should be executable. The following arguments
|
for previewing. The file should be executable. The following arguments
|
||||||
are passed to the file, (1) current file name, (2) width, (3) height,
|
are passed to the file, (1) current filename, (2) width, (3) height, (4)
|
||||||
(4) horizontal position, and (5) vertical position of preview pane
|
horizontal position, and (5) vertical position of preview pane
|
||||||
respectively. SIGPIPE signal is sent when enough lines are read. If the
|
respectively. SIGPIPE signal is sent when enough lines are read. If the
|
||||||
previewer returns a non-zero exit code, then the preview cache for the
|
previewer returns a non-zero exit code, then the preview cache for the
|
||||||
given file is disabled. This means that if the file is selected in the
|
given file is disabled. This means that if the file is selected in the
|
||||||
@@ -1000,8 +1000,8 @@ promptfmt (string) (default \033[32;1m%u@%h\033[0m:\033[34;1m%d\033[0m\033[1m%f\
|
|||||||
Format string of the prompt shown in the top line. Special expansions
|
Format string of the prompt shown in the top line. Special expansions
|
||||||
are provided, %u as the user name, %h as the hostname, %w as the working
|
are provided, %u as the user name, %h as the hostname, %w as the working
|
||||||
directory, %d as the working directory with a trailing path separator,
|
directory, %d as the working directory with a trailing path separator,
|
||||||
%f as the file name, and %F as the current filter. %S may be used once
|
%f as the filename, and %F as the current filter. %S may be used once
|
||||||
and will provide a spacer so that the following parts are right aligned
|
and will provide a spacer so that the following parts are right-aligned
|
||||||
on the screen. The home folder is shown as ~ in the working directory
|
on the screen. The home folder is shown as ~ in the working directory
|
||||||
expansion. Directory names are automatically shortened to a single
|
expansion. Directory names are automatically shortened to a single
|
||||||
character starting from the leftmost parent when the prompt does not fit
|
character starting from the leftmost parent when the prompt does not fit
|
||||||
@@ -1049,15 +1049,15 @@ scrolloff (int) (default 0)
|
|||||||
|
|
||||||
Minimum number of offset lines shown at all times at the top and bottom
|
Minimum number of offset lines shown at all times at the top and bottom
|
||||||
of the screen when scrolling. The current line is kept in the middle
|
of the screen when scrolling. The current line is kept in the middle
|
||||||
when this option is set to a large value that is bigger than the half of
|
when this option is set to a large value that is bigger than half the
|
||||||
number of lines. A smaller offset can be used when the current file is
|
number of lines. A smaller offset can be used when the current file is
|
||||||
close to the beginning or end of the list to show the maximum number of
|
close to the beginning or end of the list to show the maximum number of
|
||||||
items.
|
items.
|
||||||
|
|
||||||
searchmethod (string) default text)
|
searchmethod (string) (default text)
|
||||||
|
|
||||||
How search command patterns are treated. Currently supported methods are
|
How search command patterns are treated. Currently supported methods are
|
||||||
text (i.e. string literals), glob (i.e shell globs) and regex (i.e.
|
text (i.e. string literals), glob (i.e. shell globs) and regex (i.e.
|
||||||
regular expressions). See SEARCHING FILES for more details.
|
regular expressions). See SEARCHING FILES for more details.
|
||||||
|
|
||||||
selectfmt (string) (default \033[7;35m)
|
selectfmt (string) (default \033[7;35m)
|
||||||
@@ -1160,7 +1160,7 @@ Format string of the file modification time shown in the bottom line.
|
|||||||
|
|
||||||
truncatechar (string) (default ~)
|
truncatechar (string) (default ~)
|
||||||
|
|
||||||
The truncate character that is shown at the end when the file name does
|
The truncate character that is shown at the end when the filename does
|
||||||
not fit into the pane.
|
not fit into the pane.
|
||||||
|
|
||||||
truncatepct (int) (default 100)
|
truncatepct (int) (default 100)
|
||||||
@@ -1259,7 +1259,7 @@ configuration file (e.g. ~/.bashrc).
|
|||||||
OPENER
|
OPENER
|
||||||
|
|
||||||
If this variable is set in the environment, use the same value.
|
If this variable is set in the environment, use the same value.
|
||||||
Otherwise, this is set to start in Windows, open in MacOS, xdg-open in
|
Otherwise, this is set to start in Windows, open in macOS, xdg-open in
|
||||||
others.
|
others.
|
||||||
|
|
||||||
EDITOR
|
EDITOR
|
||||||
@@ -1381,7 +1381,7 @@ PREFIXES
|
|||||||
|
|
||||||
The following command prefixes are used by lf:
|
The following command prefixes are used by lf:
|
||||||
|
|
||||||
: read (default) builtin/custom command
|
: read (default) built-in/custom command
|
||||||
$ shell shell command
|
$ shell shell command
|
||||||
% shell-pipe shell command running with the UI
|
% shell-pipe shell command running with the UI
|
||||||
! shell-wait shell command waiting for a key press
|
! shell-wait shell command waiting for a key press
|
||||||
@@ -1412,8 +1412,8 @@ string:
|
|||||||
set hidden false # boolean disable
|
set hidden false # boolean disable
|
||||||
set hidden! # boolean toggle
|
set hidden! # boolean toggle
|
||||||
set scrolloff 10 # integer value
|
set scrolloff 10 # integer value
|
||||||
set sortby time # string value w/o quotes
|
set sortby time # string value without quotes
|
||||||
set sortby 'time' # string value with single quotes (whitespaces)
|
set sortby 'time' # string value with single quotes (whitespace)
|
||||||
set sortby "time" # string value with double quotes (backslash escapes)
|
set sortby "time" # string value with double quotes (backslash escapes)
|
||||||
|
|
||||||
Command setlocal is used to set a local option for a directory which can
|
Command setlocal is used to set a local option for a directory which can
|
||||||
@@ -1427,16 +1427,16 @@ the given directory along with its subdirectories:
|
|||||||
setlocal /foo/bar nohidden # boolean disable
|
setlocal /foo/bar nohidden # boolean disable
|
||||||
setlocal /foo/bar hidden false # boolean disable
|
setlocal /foo/bar hidden false # boolean disable
|
||||||
setlocal /foo/bar hidden! # boolean toggle
|
setlocal /foo/bar hidden! # boolean toggle
|
||||||
setlocal /foo/bar sortby time # string value w/o quotes
|
setlocal /foo/bar sortby time # string value without quotes
|
||||||
setlocal /foo/bar sortby 'time' # string value with single quotes (whitespaces)
|
setlocal /foo/bar sortby 'time' # string value with single quotes (whitespace)
|
||||||
setlocal /foo/bar sortby "time" # string value with double quotes (backslash escapes)
|
setlocal /foo/bar sortby "time" # string value with double quotes (backslash escapes)
|
||||||
setlocal /foo/bar hidden # for only '/foo/bar' directory
|
setlocal /foo/bar hidden # for only '/foo/bar' directory
|
||||||
setlocal /foo/bar/ hidden # for '/foo/bar' and its subdirectories (e.g. '/foo/bar/baz')
|
setlocal /foo/bar/ hidden # for '/foo/bar' and its subdirectories (e.g. '/foo/bar/baz')
|
||||||
|
|
||||||
Command map is used to bind a key in Normal and Visual mode to a command
|
Command map is used to bind a key in Normal and Visual mode to a command
|
||||||
which can be a builtin command, custom command, or shell command:
|
which can be a built-in command, custom command, or shell command:
|
||||||
|
|
||||||
map gh cd ~ # builtin command
|
map gh cd ~ # built-in command
|
||||||
map D trash # custom command
|
map D trash # custom command
|
||||||
map i $less $f # shell command
|
map i $less $f # shell command
|
||||||
map U !du -csh * # waiting shell command
|
map U !du -csh * # waiting shell command
|
||||||
@@ -1496,7 +1496,7 @@ Regular keys are assigned to a command with the usual syntax:
|
|||||||
|
|
||||||
map a down
|
map a down
|
||||||
|
|
||||||
Keys combined with the shift key simply use the uppercase letter:
|
Keys combined with the Shift key simply use the uppercase letter:
|
||||||
|
|
||||||
map A down
|
map A down
|
||||||
|
|
||||||
@@ -1514,21 +1514,21 @@ Function keys are prefixed with f character:
|
|||||||
|
|
||||||
map <f-1> down
|
map <f-1> down
|
||||||
|
|
||||||
Keys combined with the control key are prefixed with a c character:
|
Keys combined with the Ctrl key are prefixed with a c character:
|
||||||
|
|
||||||
map <c-a> down
|
map <c-a> down
|
||||||
|
|
||||||
Keys combined with the alt key are assigned in two different ways
|
Keys combined with the Alt key are assigned in two different ways
|
||||||
depending on the behavior of your terminal. Older terminals (e.g. xterm)
|
depending on the behavior of your terminal. Older terminals (e.g. xterm)
|
||||||
may set the 8th bit of a character when the alt key is pressed. On these
|
may set the 8th bit of a character when the Alt key is pressed. On these
|
||||||
terminals, you can use the corresponding byte for the mapping:
|
terminals, you can use the corresponding byte for the mapping:
|
||||||
|
|
||||||
map á down
|
map á down
|
||||||
|
|
||||||
Newer terminals (e.g. gnome-terminal) may prefix the key with an escape
|
Newer terminals (e.g. gnome-terminal) may prefix the key with an escape
|
||||||
key when the alt key is pressed. lf uses the escape delaying mechanism
|
character when the Alt key is pressed. lf uses the escape delaying
|
||||||
to recognize alt keys in these terminals (delay is 100ms). On these
|
mechanism to recognize Alt keys in these terminals (delay is 100ms). On
|
||||||
terminals, keys combined with the alt key are prefixed with an a
|
these terminals, keys combined with the Alt key are prefixed with an a
|
||||||
character:
|
character:
|
||||||
|
|
||||||
map <a-a> down
|
map <a-a> down
|
||||||
@@ -1640,7 +1640,7 @@ PIPING SHELL COMMANDS
|
|||||||
|
|
||||||
Regular shell commands have some limitations in some cases. When an
|
Regular shell commands have some limitations in some cases. When an
|
||||||
output or error message is given and the command exits afterwards, the
|
output or error message is given and the command exits afterwards, the
|
||||||
ui is immediately resumed and there is no way to see the message without
|
UI is immediately resumed and there is no way to see the message without
|
||||||
dropping to shell again. Also, even when there is no output or error,
|
dropping to shell again. Also, even when there is no output or error,
|
||||||
the UI still needs to be paused while the command is running. This can
|
the UI still needs to be paused while the command is running. This can
|
||||||
cause flickering on the screen for short commands and similar
|
cause flickering on the screen for short commands and similar
|
||||||
@@ -1652,14 +1652,14 @@ can be useful for programs following the Unix philosophy to give no
|
|||||||
output in the success case, and brief error messages or prompts in other
|
output in the success case, and brief error messages or prompts in other
|
||||||
cases.
|
cases.
|
||||||
|
|
||||||
For example, following rename command prompts for overwrite in the
|
For example, the following rename command prompts for overwrite in the
|
||||||
statline if there is an existing file with the given name:
|
statline if there is an existing file with the given name:
|
||||||
|
|
||||||
cmd rename %mv -i $f $1
|
cmd rename %mv -i $f $1
|
||||||
|
|
||||||
You can also output error messages in the command and it will show up in
|
You can also output error messages in the command and they will show up
|
||||||
the statline. For example, an alternative rename command may look like
|
in the statline. For example, an alternative rename command may look
|
||||||
this:
|
like this:
|
||||||
|
|
||||||
cmd rename %[ -e $1 ] && printf "file exists" || mv $f $1
|
cmd rename %[ -e $1 ] && printf "file exists" || mv $f $1
|
||||||
|
|
||||||
@@ -1708,7 +1708,7 @@ send a command to a single client:
|
|||||||
|
|
||||||
lf -remote 'send 1234 echo hello world'
|
lf -remote 'send 1234 echo hello world'
|
||||||
|
|
||||||
All clients have a unique id number but you may not be aware of the id
|
All clients have a unique ID number but you may not be aware of the ID
|
||||||
number when you are writing a command. For this purpose, an $id variable
|
number when you are writing a command. For this purpose, an $id variable
|
||||||
is exported to the environment for shell commands. The value of this
|
is exported to the environment for shell commands. The value of this
|
||||||
variable is set to the process ID of the client. You can use it to send
|
variable is set to the process ID of the client. You can use it to send
|
||||||
@@ -1733,7 +1733,7 @@ UI with respect to the terminal width as follows:
|
|||||||
}}
|
}}
|
||||||
|
|
||||||
In addition, the query command can be used to obtain information about a
|
In addition, the query command can be used to obtain information about a
|
||||||
specific lf instance by providing its id:
|
specific lf instance by providing its ID:
|
||||||
|
|
||||||
lf -remote "query $id maps"
|
lf -remote "query $id maps"
|
||||||
|
|
||||||
@@ -1792,8 +1792,8 @@ named pipes, and sockets are skipped and links are not followed. Moving
|
|||||||
is performed using the rename operation of the underlying OS. For
|
is performed using the rename operation of the underlying OS. For
|
||||||
cross-device moving, lf falls back to copying and then deletes the
|
cross-device moving, lf falls back to copying and then deletes the
|
||||||
original files if there are no errors. Operation errors are shown in the
|
original files if there are no errors. Operation errors are shown in the
|
||||||
message line as well as the log file and they do not preemptively finish
|
message line as well as the log file and they do not prematurely
|
||||||
the corresponding file operation.
|
terminate the corresponding file operation.
|
||||||
|
|
||||||
File operations can be performed on the currently selected file or on
|
File operations can be performed on the currently selected file or on
|
||||||
multiple files by selecting them first. When you copy a file, lf doesn't
|
multiple files by selecting them first. When you copy a file, lf doesn't
|
||||||
@@ -1864,14 +1864,14 @@ zero, then the keys are read until there is only a single match. The
|
|||||||
default values of these two options are set to jump to the first file
|
default values of these two options are set to jump to the first file
|
||||||
with the given initial.
|
with the given initial.
|
||||||
|
|
||||||
Some options effect both searching and finding. You can disable wrapscan
|
Some options affect both searching and finding. You can disable wrapscan
|
||||||
option to prevent searches from being wrapped around at the end of the
|
option to prevent searches from being wrapped around at the end of the
|
||||||
file list. You can disable ignorecase option to match cases in the
|
file list. You can disable ignorecase option to match cases in the
|
||||||
pattern and the filename. This option is already automatically
|
pattern and the filename. This option is already automatically
|
||||||
overridden if the pattern contains upper-case characters. You can
|
overridden if the pattern contains uppercase characters. You can disable
|
||||||
disable smartcase option to disable this behavior. Two similar options
|
smartcase option to disable this behavior. Two similar options ignoredia
|
||||||
ignoredia and smartdia are provided to control matching diacritics in
|
and smartdia are provided to control matching diacritics in Latin
|
||||||
Latin letters.
|
letters.
|
||||||
|
|
||||||
OPENING FILES
|
OPENING FILES
|
||||||
|
|
||||||
@@ -1886,7 +1886,7 @@ It is possible to use different command types:
|
|||||||
|
|
||||||
cmd open &xdg-open $f
|
cmd open &xdg-open $f
|
||||||
|
|
||||||
You may want to use either file extensions or mime types from file
|
You may want to use either file extensions or MIME types from file
|
||||||
command:
|
command:
|
||||||
|
|
||||||
cmd open ${{
|
cmd open ${{
|
||||||
@@ -1928,12 +1928,12 @@ PREVIEWING FILES
|
|||||||
lf previews files on the preview pane by printing the file until the end
|
lf previews files on the preview pane by printing the file until the end
|
||||||
or until the preview pane is filled. This output can be enhanced by
|
or until the preview pane is filled. This output can be enhanced by
|
||||||
providing a custom preview script for filtering. This can be used to
|
providing a custom preview script for filtering. This can be used to
|
||||||
highlight source codes, list contents of archive files or view PDF or
|
highlight source code, list contents of archive files or view PDF or
|
||||||
image files to name a few. For coloring lf recognizes ANSI escape codes.
|
image files to name a few. For coloring lf recognizes ANSI escape codes.
|
||||||
|
|
||||||
To use this feature, you need to set the value of previewer option to
|
To use this feature, you need to set the value of previewer option to
|
||||||
the path of an executable file. Five arguments are passed to the file,
|
the path of an executable file. Five arguments are passed to the file,
|
||||||
(1) current file name, (2) width, (3) height, (4) horizontal position,
|
(1) current filename, (2) width, (3) height, (4) horizontal position,
|
||||||
and (5) vertical position of preview pane respectively. The output of
|
and (5) vertical position of preview pane respectively. The output of
|
||||||
the execution is printed in the preview pane. You may also want to use
|
the execution is printed in the preview pane. You may also want to use
|
||||||
the same script in your pager mapping as well:
|
the same script in your pager mapping as well:
|
||||||
@@ -1951,7 +1951,7 @@ still be displayed in the statusline below:
|
|||||||
Since this script is called for each file selection change it needs to
|
Since this script is called for each file selection change it needs to
|
||||||
be as efficient as possible and this responsibility is left to the user.
|
be as efficient as possible and this responsibility is left to the user.
|
||||||
You may use file extensions to determine the type of file more
|
You may use file extensions to determine the type of file more
|
||||||
efficiently compared to obtaining mime types from file command.
|
efficiently compared to obtaining MIME types from file command.
|
||||||
Extensions can then be used to match cleanly within a conditional:
|
Extensions can then be used to match cleanly within a conditional:
|
||||||
|
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
@@ -2099,7 +2099,7 @@ environment variables possibly by overwriting its previous values.
|
|||||||
Colors are set in the following order:
|
Colors are set in the following order:
|
||||||
|
|
||||||
1. default
|
1. default
|
||||||
2. LSCOLORS (Mac/BSD ls)
|
2. LSCOLORS (macOS/BSD ls)
|
||||||
3. LS_COLORS (GNU ls)
|
3. LS_COLORS (GNU ls)
|
||||||
4. LF_COLORS (lf specific)
|
4. LF_COLORS (lf specific)
|
||||||
5. colors file (lf specific)
|
5. colors file (lf specific)
|
||||||
@@ -2231,7 +2231,7 @@ escaping newlines with backslashes as follows:
|
|||||||
"
|
"
|
||||||
|
|
||||||
The ln entry supports the special value target, which will use the link
|
The ln entry supports the special value target, which will use the link
|
||||||
target to select a style. File name rules will still apply based on the
|
target to select a style. Filename rules will still apply based on the
|
||||||
link's name -- this mirrors GNU's ls and dircolors behavior. Having such
|
link's name -- this mirrors GNU's ls and dircolors behavior. Having such
|
||||||
a long variable definition in a shell configuration file might be
|
a long variable definition in a shell configuration file might be
|
||||||
undesirable. You may instead use the colors file (refer to the
|
undesirable. You may instead use the colors file (refer to the
|
||||||
@@ -2244,19 +2244,17 @@ ICONS
|
|||||||
|
|
||||||
Icons are configured using LF_ICONS environment variable or an icons
|
Icons are configured using LF_ICONS environment variable or an icons
|
||||||
file (refer to the CONFIGURATION section). The variable uses the same
|
file (refer to the CONFIGURATION section). The variable uses the same
|
||||||
syntax as LS_COLORS/LF_COLORS. Instead of colors, you should put a
|
syntax as LS_COLORS/LF_COLORS. Instead of colors, you should use single
|
||||||
single characters as values of entries. The ln entry supports the
|
characters or symbols as values. The ln entry supports the special value
|
||||||
special value target, which will use the link target to select a icon.
|
target, which will use the link target to select a icon. Filename rules
|
||||||
File name rules will still apply based on the link's name -- this
|
will still apply based on the link's name -- this mirrors GNU's ls and
|
||||||
mirrors GNU's ls and dircolors behavior. The icons file (refer to the
|
dircolors behavior. The icons file (refer to the CONFIGURATION section)
|
||||||
CONFIGURATION section) should consist of whitespace-separated arrays
|
should consist of whitespace-separated arrays with a # character to
|
||||||
with a # character to start comments until the end of the line. Each
|
start comments until the end of the line. Each line should contain 1-3
|
||||||
line should contain 1-3 columns, first column is filetype or filename
|
columns: a file type or file name pattern, the icon, and an optional
|
||||||
pattern, second column is the icon, third column is an optional icon
|
icon color. Using only one column disables all rules for that type or
|
||||||
color. If there is only one column, means to disable rule for this
|
name. Do not forget to add set icons true to your lfrc to see the icons.
|
||||||
filetype or pattern. Do not forget to add set icons true to your lfrc to
|
Default values are listed below in the order lf matches them:
|
||||||
see the icons. Default values are as follows given with their matching
|
|
||||||
order in lf:
|
|
||||||
|
|
||||||
ln l
|
ln l
|
||||||
or l
|
or l
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
.\" Automatically generated by Pandoc 3.7.0.2
|
.\" Automatically generated by Pandoc 3.7.0.2
|
||||||
.\"
|
.\"
|
||||||
.TH "LF" "1" "2025\-09\-09" "r38" "DOCUMENTATION"
|
.TH "LF" "1" "2025\-09\-17" "r38" "DOCUMENTATION"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
lf \- terminal file manager
|
lf \- terminal file manager
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
\f[B]lf\f[R] [\f[B]\-command\f[R] \f[I]command\f[R]] [\f[B]\-config\f[R]
|
\f[B]lf\f[R] [\f[B]\-command\f[R] \f[I]command\f[R]] [\f[B]\-config\f[R]
|
||||||
\f[I]path\f[R]] [\f[B]\-cpuprofile\f[R] \f[I]path\f[R]]
|
\f[I]path\f[R]] [\f[B]\-cpuprofile\f[R] \f[I]path\f[R]]
|
||||||
[\f[B]\-doc\f[R]] [\f[B]\-last\-dir\-path\f[R] \f[I]path\f[R]]
|
[\f[B]\-doc\f[R]] [\f[B]\-last\-dir\-path\f[R] \f[I]path\f[R]]
|
||||||
[\f[B]\-log path\f[R]] [\f[B]\-memprofile\f[R] \f[I]path\f[R]]
|
[\f[B]\-log\f[R] \f[I]path\f[R]] [\f[B]\-memprofile\f[R] \f[I]path\f[R]]
|
||||||
[\f[B]\-print\-last\-dir\f[R]] [\f[B]\-print\-selection\f[R]]
|
[\f[B]\-print\-last\-dir\f[R]] [\f[B]\-print\-selection\f[R]]
|
||||||
[\f[B]\-remote\f[R] \f[I]command\f[R]] [\f[B]\-selection\-path\f[R]
|
[\f[B]\-remote\f[R] \f[I]command\f[R]] [\f[B]\-selection\-path\f[R]
|
||||||
\f[I]path\f[R]] [\f[B]\-server\f[R]] [\f[B]\-single\f[R]]
|
\f[I]path\f[R]] [\f[B]\-server\f[R]] [\f[B]\-single\f[R]]
|
||||||
@@ -333,7 +333,7 @@ Left mouse button
|
|||||||
Click on a file or directory to select it.
|
Click on a file or directory to select it.
|
||||||
|
|
||||||
Right mouse button
|
Right mouse button
|
||||||
Enter a directory or open a file. Also works on the preview window.
|
Enter a directory or open a file. Also works on the preview pane.
|
||||||
|
|
||||||
Scroll wheel
|
Scroll wheel
|
||||||
Move up or down. If Ctrl is pressed, scroll up or down.
|
Move up or down. If Ctrl is pressed, scroll up or down.
|
||||||
@@ -501,14 +501,14 @@ Read a shell command to execute.
|
|||||||
Read a shell command to execute piping its standard I/O to the bottom
|
Read a shell command to execute piping its standard I/O to the bottom
|
||||||
statline.
|
statline.
|
||||||
.SS shell\-wait (modal) (default \f[CR]!\f[R])
|
.SS shell\-wait (modal) (default \f[CR]!\f[R])
|
||||||
Read a shell command to execute and wait for a key press in the end.
|
Read a shell command to execute and wait for a key press at the end.
|
||||||
.SS shell\-async (modal) (default \f[CR]&\f[R])
|
.SS shell\-async (modal) (default \f[CR]&\f[R])
|
||||||
Read a shell command to execute asynchronously without standard I/O.
|
Read a shell command to execute asynchronously without standard I/O.
|
||||||
.SS find (modal) (default \f[CR]f\f[R]), find\-back (modal) (default \f[CR]F\f[R]), find\-next (default \f[CR];\f[R]), find\-prev (default \f[CR],\f[R])
|
.SS find (modal) (default \f[CR]f\f[R]), find\-back (modal) (default \f[CR]F\f[R]), find\-next (default \f[CR];\f[R]), find\-prev (default \f[CR],\f[R])
|
||||||
Read key(s) to find the appropriate file name match in the
|
Read key(s) to find the appropriate filename match in the
|
||||||
forward/backward direction and jump to the next/previous match.
|
forward/backward direction and jump to the next/previous match.
|
||||||
.SS search (default \f[CR]/\f[R]), search\-back (default \f[CR]?\f[R]), search\-next (default \f[CR]n\f[R]), search\-prev (default \f[CR]N\f[R])
|
.SS search (default \f[CR]/\f[R]), search\-back (default \f[CR]?\f[R]), search\-next (default \f[CR]n\f[R]), search\-prev (default \f[CR]N\f[R])
|
||||||
Read a pattern to search for a file name match in the forward/backward
|
Read a pattern to search for a filename match in the forward/backward
|
||||||
direction and jump to the next/previous match.
|
direction and jump to the next/previous match.
|
||||||
.SS filter (modal), setfilter
|
.SS filter (modal), setfilter
|
||||||
Command \f[CR]filter\f[R] reads a pattern to filter out and only view
|
Command \f[CR]filter\f[R] reads a pattern to filter out and only view
|
||||||
@@ -532,7 +532,7 @@ You can define a new tag\-clearing command by combining \f[CR]tag\f[R]
|
|||||||
with \f[CR]tag\-toggle\f[R] (i.e.
|
with \f[CR]tag\-toggle\f[R] (i.e.
|
||||||
\f[CR]cmd tag\-clear :tag; tag\-toggle\f[R]).
|
\f[CR]cmd tag\-clear :tag; tag\-toggle\f[R]).
|
||||||
.SS tag\-toggle (default \f[CR]t\f[R])
|
.SS tag\-toggle (default \f[CR]t\f[R])
|
||||||
Tag a file with \f[CR]*\f[R] or a single width character given in the
|
Tag a file with \f[CR]*\f[R] or a single\-width character given in the
|
||||||
argument if the file is untagged, otherwise remove the tag.
|
argument if the file is untagged, otherwise remove the tag.
|
||||||
.SS echo
|
.SS echo
|
||||||
Print the given arguments to the message line at the bottom.
|
Print the given arguments to the message line at the bottom.
|
||||||
@@ -609,7 +609,7 @@ You can go back with \f[CR]cmd\-delete\-back\f[R]
|
|||||||
The command line commands should be mostly compatible with readline
|
The command line commands should be mostly compatible with readline
|
||||||
keybindings.
|
keybindings.
|
||||||
A character refers to a Unicode code point, a word consists of letters
|
A character refers to a Unicode code point, a word consists of letters
|
||||||
and digits, and a unix word consists of any non\-blank characters.
|
and digits, and a Unix word consists of any non\-blank characters.
|
||||||
.SS cmd\-insert
|
.SS cmd\-insert
|
||||||
Insert the character given in the argument.
|
Insert the character given in the argument.
|
||||||
This command is automatically called when required.
|
This command is automatically called when required.
|
||||||
@@ -645,7 +645,7 @@ When at the beginning of a prompt, returns either to Normal mode or to
|
|||||||
.SS cmd\-delete\-home (default \f[CR]<c\-u>\f[R]), cmd\-delete\-end (default \f[CR]<c\-k>\f[R])
|
.SS cmd\-delete\-home (default \f[CR]<c\-u>\f[R]), cmd\-delete\-end (default \f[CR]<c\-k>\f[R])
|
||||||
Delete everything up to the beginning/end of the line.
|
Delete everything up to the beginning/end of the line.
|
||||||
.SS cmd\-delete\-unix\-word (default \f[CR]<c\-w>\f[R])
|
.SS cmd\-delete\-unix\-word (default \f[CR]<c\-w>\f[R])
|
||||||
Delete the previous unix word.
|
Delete the previous Unix word.
|
||||||
.SS cmd\-yank (default \f[CR]<c\-y>\f[R])
|
.SS cmd\-yank (default \f[CR]<c\-y>\f[R])
|
||||||
Paste the buffer content containing the last deleted item.
|
Paste the buffer content containing the last deleted item.
|
||||||
.SS cmd\-transpose (default \f[CR]<c\-t>\f[R]), cmd\-transpose\-word (default \f[CR]<a\-t>\f[R])
|
.SS cmd\-transpose (default \f[CR]<c\-t>\f[R]), cmd\-transpose\-word (default \f[CR]<a\-t>\f[R])
|
||||||
@@ -665,8 +665,8 @@ Character \f[CR]:\f[R] is used as the separator for list options
|
|||||||
\f[CR][]int\f[R] and \f[CR][]string\f[R].
|
\f[CR][]int\f[R] and \f[CR][]string\f[R].
|
||||||
.SS anchorfind (bool) (default true)
|
.SS anchorfind (bool) (default true)
|
||||||
When this option is enabled, the find command starts matching patterns
|
When this option is enabled, the find command starts matching patterns
|
||||||
from the beginning of file names, otherwise, it can match at an
|
from the beginning of filenames, otherwise, it can match at an arbitrary
|
||||||
arbitrary position.
|
position.
|
||||||
.SS autoquit (bool) (default true)
|
.SS autoquit (bool) (default true)
|
||||||
Automatically quit the server when there are no clients left connected.
|
Automatically quit the server when there are no clients left connected.
|
||||||
.SS borderfmt (string) (default \f[CR]\(rs033[0m\f[R])
|
.SS borderfmt (string) (default \f[CR]\(rs033[0m\f[R])
|
||||||
@@ -677,14 +677,14 @@ Set the path of a cleaner file.
|
|||||||
The file should be executable.
|
The file should be executable.
|
||||||
This file is called if previewing is enabled, the previewer is set, and
|
This file is called if previewing is enabled, the previewer is set, and
|
||||||
the previously selected file has its preview cache disabled.
|
the previously selected file has its preview cache disabled.
|
||||||
The following arguments are passed to the file, (1) current file name,
|
The following arguments are passed to the file, (1) current filename,
|
||||||
(2) width, (3) height, (4) horizontal position, (5) vertical position of
|
(2) width, (3) height, (4) horizontal position, (5) vertical position of
|
||||||
preview pane and (6) next file name to be previewed respectively.
|
preview pane and (6) next filename to be previewed respectively.
|
||||||
Preview cleaning is disabled when the value of this option is left
|
Preview cleaning is disabled when the value of this option is left
|
||||||
empty.
|
empty.
|
||||||
.SS copyfmt (string) (default \f[CR]\(rs033[7;33m\f[R])
|
.SS copyfmt (string) (default \f[CR]\(rs033[7;33m\f[R])
|
||||||
Format string of the indicator for files to be copied.
|
Format string of the indicator for files to be copied.
|
||||||
.SS cursoractivefmt (string) (default \f[CR]\(rs033[7m\f[R]), cursorparentfmt string (default \f[CR]\(rs033[7m\f[R]), cursorpreviewfmt string (default \f[CR]\(rs033[4m\f[R])
|
.SS cursoractivefmt (string) (default \f[CR]\(rs033[7m\f[R]), cursorparentfmt (string) (default \f[CR]\(rs033[7m\f[R]), cursorpreviewfmt (string) (default \f[CR]\(rs033[4m\f[R])
|
||||||
Format strings for highlighting the cursor.
|
Format strings for highlighting the cursor.
|
||||||
\f[CR]cursoractivefmt\f[R] applies in the current directory pane,
|
\f[CR]cursoractivefmt\f[R] applies in the current directory pane,
|
||||||
\f[CR]cursorparentfmt\f[R] applies in panes that show parents of the
|
\f[CR]cursorparentfmt\f[R] applies in panes that show parents of the
|
||||||
@@ -731,12 +731,12 @@ This allows custom previews for directories.
|
|||||||
.SS drawbox (bool) (default false)
|
.SS drawbox (bool) (default false)
|
||||||
Draw boxes around panes with box drawing characters.
|
Draw boxes around panes with box drawing characters.
|
||||||
.SS dupfilefmt (string) (default \f[CR]%f.\(ti%n\(ti\f[R])
|
.SS dupfilefmt (string) (default \f[CR]%f.\(ti%n\(ti\f[R])
|
||||||
Format string of file name when creating duplicate files.
|
Format string of filename when creating duplicate files.
|
||||||
With the default format, copying a file \f[CR]abc.txt\f[R] to the same
|
With the default format, copying a file \f[CR]abc.txt\f[R] to the same
|
||||||
directory will result in a duplicate file called
|
directory will result in a duplicate file called
|
||||||
\f[CR]abc.txt.\(ti1\(ti\f[R].
|
\f[CR]abc.txt.\(ti1\(ti\f[R].
|
||||||
Special expansions are provided, \f[CR]%f\f[R] as the file name,
|
Special expansions are provided, \f[CR]%f\f[R] as the file name,
|
||||||
\f[CR]%b\f[R] for the basename (file name without extension),
|
\f[CR]%b\f[R] for the base name (file name without extension),
|
||||||
\f[CR]%e\f[R] as the extension (including the dot) and \f[CR]%n\f[R] as
|
\f[CR]%e\f[R] as the extension (including the dot) and \f[CR]%n\f[R] as
|
||||||
the number of duplicates.
|
the number of duplicates.
|
||||||
.SS errorfmt (string) (default \f[CR]\(rs033[7;31;47m\f[R])
|
.SS errorfmt (string) (default \f[CR]\(rs033[7;31;47m\f[R])
|
||||||
@@ -857,7 +857,7 @@ considered binary files and displayed as \f[CR]binary\f[R].
|
|||||||
Set the path of a previewer file to filter the content of regular files
|
Set the path of a previewer file to filter the content of regular files
|
||||||
for previewing.
|
for previewing.
|
||||||
The file should be executable.
|
The file should be executable.
|
||||||
The following arguments are passed to the file, (1) current file name,
|
The following arguments are passed to the file, (1) current filename,
|
||||||
(2) width, (3) height, (4) horizontal position, and (5) vertical
|
(2) width, (3) height, (4) horizontal position, and (5) vertical
|
||||||
position of preview pane respectively.
|
position of preview pane respectively.
|
||||||
SIGPIPE signal is sent when enough lines are read.
|
SIGPIPE signal is sent when enough lines are read.
|
||||||
@@ -872,9 +872,9 @@ Format string of the prompt shown in the top line.
|
|||||||
Special expansions are provided, \f[CR]%u\f[R] as the user name,
|
Special expansions are provided, \f[CR]%u\f[R] as the user name,
|
||||||
\f[CR]%h\f[R] as the hostname, \f[CR]%w\f[R] as the working directory,
|
\f[CR]%h\f[R] as the hostname, \f[CR]%w\f[R] as the working directory,
|
||||||
\f[CR]%d\f[R] as the working directory with a trailing path separator,
|
\f[CR]%d\f[R] as the working directory with a trailing path separator,
|
||||||
\f[CR]%f\f[R] as the file name, and \f[CR]%F\f[R] as the current filter.
|
\f[CR]%f\f[R] as the filename, and \f[CR]%F\f[R] as the current filter.
|
||||||
\f[CR]%S\f[R] may be used once and will provide a spacer so that the
|
\f[CR]%S\f[R] may be used once and will provide a spacer so that the
|
||||||
following parts are right aligned on the screen.
|
following parts are right\-aligned on the screen.
|
||||||
The home folder is shown as \f[CR]\(ti\f[R] in the working directory
|
The home folder is shown as \f[CR]\(ti\f[R] in the working directory
|
||||||
expansion.
|
expansion.
|
||||||
Directory names are automatically shortened to a single character
|
Directory names are automatically shortened to a single character
|
||||||
@@ -920,14 +920,14 @@ discarded and not shown.
|
|||||||
Minimum number of offset lines shown at all times at the top and bottom
|
Minimum number of offset lines shown at all times at the top and bottom
|
||||||
of the screen when scrolling.
|
of the screen when scrolling.
|
||||||
The current line is kept in the middle when this option is set to a
|
The current line is kept in the middle when this option is set to a
|
||||||
large value that is bigger than the half of number of lines.
|
large value that is bigger than half the number of lines.
|
||||||
A smaller offset can be used when the current file is close to the
|
A smaller offset can be used when the current file is close to the
|
||||||
beginning or end of the list to show the maximum number of items.
|
beginning or end of the list to show the maximum number of items.
|
||||||
.SS searchmethod (string) default \f[CR]text\f[R])
|
.SS searchmethod (string) (default \f[CR]text\f[R])
|
||||||
How search command patterns are treated.
|
How search command patterns are treated.
|
||||||
Currently supported methods are \f[CR]text\f[R] (i.e.
|
Currently supported methods are \f[CR]text\f[R] (i.e.
|
||||||
string literals), \f[CR]glob\f[R] (i.e shell globs) and \f[CR]regex\f[R]
|
string literals), \f[CR]glob\f[R] (i.e.
|
||||||
(i.e.
|
shell globs) and \f[CR]regex\f[R] (i.e.
|
||||||
regular expressions).
|
regular expressions).
|
||||||
See \f[CR]SEARCHING FILES\f[R] for more details.
|
See \f[CR]SEARCHING FILES\f[R] for more details.
|
||||||
.SS selectfmt (string) (default \f[CR]\(rs033[7;35m\f[R])
|
.SS selectfmt (string) (default \f[CR]\(rs033[7;35m\f[R])
|
||||||
@@ -1015,7 +1015,7 @@ temporary and it does not need to be specified.
|
|||||||
.SS timefmt (string) (default \f[CR]Mon Jan _2 15:04:05 2006\f[R])
|
.SS timefmt (string) (default \f[CR]Mon Jan _2 15:04:05 2006\f[R])
|
||||||
Format string of the file modification time shown in the bottom line.
|
Format string of the file modification time shown in the bottom line.
|
||||||
.SS truncatechar (string) (default \f[CR]\(ti\f[R])
|
.SS truncatechar (string) (default \f[CR]\(ti\f[R])
|
||||||
The truncate character that is shown at the end when the file name does
|
The truncate character that is shown at the end when the filename does
|
||||||
not fit into the pane.
|
not fit into the pane.
|
||||||
.SS truncatepct (int) (default 100)
|
.SS truncatepct (int) (default 100)
|
||||||
When a filename is too long to be shown completely, the available space
|
When a filename is too long to be shown completely, the available space
|
||||||
@@ -1092,7 +1092,7 @@ in your shell configuration file (e.g.
|
|||||||
.SS OPENER
|
.SS OPENER
|
||||||
If this variable is set in the environment, use the same value.
|
If this variable is set in the environment, use the same value.
|
||||||
Otherwise, this is set to \f[CR]start\f[R] in Windows, \f[CR]open\f[R]
|
Otherwise, this is set to \f[CR]start\f[R] in Windows, \f[CR]open\f[R]
|
||||||
in MacOS, \f[CR]xdg\-open\f[R] in others.
|
in macOS, \f[CR]xdg\-open\f[R] in others.
|
||||||
.SS EDITOR
|
.SS EDITOR
|
||||||
If VISUAL is set in the environment, use its value.
|
If VISUAL is set in the environment, use its value.
|
||||||
Otherwise, use the value of the environment variable EDITOR.
|
Otherwise, use the value of the environment variable EDITOR.
|
||||||
@@ -1173,7 +1173,7 @@ This shell command can be defined to be executed before quitting.
|
|||||||
The following command prefixes are used by lf:
|
The following command prefixes are used by lf:
|
||||||
.IP
|
.IP
|
||||||
.EX
|
.EX
|
||||||
: read (default) builtin/custom command
|
: read (default) built\-in/custom command
|
||||||
$ shell shell command
|
$ shell shell command
|
||||||
% shell\-pipe shell command running with the UI
|
% shell\-pipe shell command running with the UI
|
||||||
! shell\-wait shell command waiting for a key press
|
! shell\-wait shell command waiting for a key press
|
||||||
@@ -1208,8 +1208,8 @@ set nohidden # boolean disable
|
|||||||
set hidden false # boolean disable
|
set hidden false # boolean disable
|
||||||
set hidden! # boolean toggle
|
set hidden! # boolean toggle
|
||||||
set scrolloff 10 # integer value
|
set scrolloff 10 # integer value
|
||||||
set sortby time # string value w/o quotes
|
set sortby time # string value without quotes
|
||||||
set sortby \(aqtime\(aq # string value with single quotes (whitespaces)
|
set sortby \(aqtime\(aq # string value with single quotes (whitespace)
|
||||||
set sortby \(dqtime\(dq # string value with double quotes (backslash escapes)
|
set sortby \(dqtime\(dq # string value with double quotes (backslash escapes)
|
||||||
.EE
|
.EE
|
||||||
.PP
|
.PP
|
||||||
@@ -1228,19 +1228,19 @@ setlocal /foo/bar hidden true # boolean enable
|
|||||||
setlocal /foo/bar nohidden # boolean disable
|
setlocal /foo/bar nohidden # boolean disable
|
||||||
setlocal /foo/bar hidden false # boolean disable
|
setlocal /foo/bar hidden false # boolean disable
|
||||||
setlocal /foo/bar hidden! # boolean toggle
|
setlocal /foo/bar hidden! # boolean toggle
|
||||||
setlocal /foo/bar sortby time # string value w/o quotes
|
setlocal /foo/bar sortby time # string value without quotes
|
||||||
setlocal /foo/bar sortby \(aqtime\(aq # string value with single quotes (whitespaces)
|
setlocal /foo/bar sortby \(aqtime\(aq # string value with single quotes (whitespace)
|
||||||
setlocal /foo/bar sortby \(dqtime\(dq # string value with double quotes (backslash escapes)
|
setlocal /foo/bar sortby \(dqtime\(dq # string value with double quotes (backslash escapes)
|
||||||
setlocal /foo/bar hidden # for only \(aq/foo/bar\(aq directory
|
setlocal /foo/bar hidden # for only \(aq/foo/bar\(aq directory
|
||||||
setlocal /foo/bar/ hidden # for \(aq/foo/bar\(aq and its subdirectories (e.g. \(aq/foo/bar/baz\(aq)
|
setlocal /foo/bar/ hidden # for \(aq/foo/bar\(aq and its subdirectories (e.g. \(aq/foo/bar/baz\(aq)
|
||||||
.EE
|
.EE
|
||||||
.PP
|
.PP
|
||||||
Command \f[CR]map\f[R] is used to bind a key in Normal and Visual mode
|
Command \f[CR]map\f[R] is used to bind a key in Normal and Visual mode
|
||||||
to a command which can be a builtin command, custom command, or shell
|
to a command which can be a built\-in command, custom command, or shell
|
||||||
command:
|
command:
|
||||||
.IP
|
.IP
|
||||||
.EX
|
.EX
|
||||||
map gh cd \(ti # builtin command
|
map gh cd \(ti # built\-in command
|
||||||
map D trash # custom command
|
map D trash # custom command
|
||||||
map i $less $f # shell command
|
map i $less $f # shell command
|
||||||
map U !du \-csh * # waiting shell command
|
map U !du \-csh * # waiting shell command
|
||||||
@@ -1318,7 +1318,7 @@ Regular keys are assigned to a command with the usual syntax:
|
|||||||
map a down
|
map a down
|
||||||
.EE
|
.EE
|
||||||
.PP
|
.PP
|
||||||
Keys combined with the shift key simply use the uppercase letter:
|
Keys combined with the Shift key simply use the uppercase letter:
|
||||||
.IP
|
.IP
|
||||||
.EX
|
.EX
|
||||||
map A down
|
map A down
|
||||||
@@ -1344,17 +1344,17 @@ Function keys are prefixed with \f[CR]f\f[R] character:
|
|||||||
map <f\-1> down
|
map <f\-1> down
|
||||||
.EE
|
.EE
|
||||||
.PP
|
.PP
|
||||||
Keys combined with the control key are prefixed with a \f[CR]c\f[R]
|
Keys combined with the Ctrl key are prefixed with a \f[CR]c\f[R]
|
||||||
character:
|
character:
|
||||||
.IP
|
.IP
|
||||||
.EX
|
.EX
|
||||||
map <c\-a> down
|
map <c\-a> down
|
||||||
.EE
|
.EE
|
||||||
.PP
|
.PP
|
||||||
Keys combined with the alt key are assigned in two different ways
|
Keys combined with the Alt key are assigned in two different ways
|
||||||
depending on the behavior of your terminal.
|
depending on the behavior of your terminal.
|
||||||
Older terminals (e.g.
|
Older terminals (e.g.
|
||||||
xterm) may set the 8th bit of a character when the alt key is pressed.
|
xterm) may set the 8th bit of a character when the Alt key is pressed.
|
||||||
On these terminals, you can use the corresponding byte for the mapping:
|
On these terminals, you can use the corresponding byte for the mapping:
|
||||||
.IP
|
.IP
|
||||||
.EX
|
.EX
|
||||||
@@ -1362,11 +1362,11 @@ map á down
|
|||||||
.EE
|
.EE
|
||||||
.PP
|
.PP
|
||||||
Newer terminals (e.g.
|
Newer terminals (e.g.
|
||||||
gnome\-terminal) may prefix the key with an escape key when the alt key
|
gnome\-terminal) may prefix the key with an escape character when the
|
||||||
is pressed.
|
Alt key is pressed.
|
||||||
lf uses the escape delaying mechanism to recognize alt keys in these
|
lf uses the escape delaying mechanism to recognize Alt keys in these
|
||||||
terminals (delay is 100ms).
|
terminals (delay is 100ms).
|
||||||
On these terminals, keys combined with the alt key are prefixed with an
|
On these terminals, keys combined with the Alt key are prefixed with an
|
||||||
\f[CR]a\f[R] character:
|
\f[CR]a\f[R] character:
|
||||||
.IP
|
.IP
|
||||||
.EX
|
.EX
|
||||||
@@ -1506,7 +1506,7 @@ the rest of the documentation.
|
|||||||
.SH PIPING SHELL COMMANDS
|
.SH PIPING SHELL COMMANDS
|
||||||
Regular shell commands have some limitations in some cases.
|
Regular shell commands have some limitations in some cases.
|
||||||
When an output or error message is given and the command exits
|
When an output or error message is given and the command exits
|
||||||
afterwards, the ui is immediately resumed and there is no way to see the
|
afterwards, the UI is immediately resumed and there is no way to see the
|
||||||
message without dropping to shell again.
|
message without dropping to shell again.
|
||||||
Also, even when there is no output or error, the UI still needs to be
|
Also, even when there is no output or error, the UI still needs to be
|
||||||
paused while the command is running.
|
paused while the command is running.
|
||||||
@@ -1519,15 +1519,15 @@ This can be useful for programs following the Unix philosophy to give no
|
|||||||
output in the success case, and brief error messages or prompts in other
|
output in the success case, and brief error messages or prompts in other
|
||||||
cases.
|
cases.
|
||||||
.PP
|
.PP
|
||||||
For example, following rename command prompts for overwrite in the
|
For example, the following rename command prompts for overwrite in the
|
||||||
statline if there is an existing file with the given name:
|
statline if there is an existing file with the given name:
|
||||||
.IP
|
.IP
|
||||||
.EX
|
.EX
|
||||||
cmd rename %mv \-i $f $1
|
cmd rename %mv \-i $f $1
|
||||||
.EE
|
.EE
|
||||||
.PP
|
.PP
|
||||||
You can also output error messages in the command and it will show up in
|
You can also output error messages in the command and they will show up
|
||||||
the statline.
|
in the statline.
|
||||||
For example, an alternative rename command may look like this:
|
For example, an alternative rename command may look like this:
|
||||||
.IP
|
.IP
|
||||||
.EX
|
.EX
|
||||||
@@ -1586,7 +1586,7 @@ client:
|
|||||||
lf \-remote \(aqsend 1234 echo hello world\(aq
|
lf \-remote \(aqsend 1234 echo hello world\(aq
|
||||||
.EE
|
.EE
|
||||||
.PP
|
.PP
|
||||||
All clients have a unique id number but you may not be aware of the id
|
All clients have a unique ID number but you may not be aware of the ID
|
||||||
number when you are writing a command.
|
number when you are writing a command.
|
||||||
For this purpose, an \f[CR]$id\f[R] variable is exported to the
|
For this purpose, an \f[CR]$id\f[R] variable is exported to the
|
||||||
environment for shell commands.
|
environment for shell commands.
|
||||||
@@ -1618,7 +1618,7 @@ cmd recol %{{
|
|||||||
.EE
|
.EE
|
||||||
.PP
|
.PP
|
||||||
In addition, the \f[CR]query\f[R] command can be used to obtain
|
In addition, the \f[CR]query\f[R] command can be used to obtain
|
||||||
information about a specific lf instance by providing its id:
|
information about a specific lf instance by providing its ID:
|
||||||
.IP
|
.IP
|
||||||
.EX
|
.EX
|
||||||
lf \-remote \(dqquery $id maps\(dq
|
lf \-remote \(dqquery $id maps\(dq
|
||||||
@@ -1691,7 +1691,7 @@ Moving is performed using the rename operation of the underlying OS.
|
|||||||
For cross\-device moving, lf falls back to copying and then deletes the
|
For cross\-device moving, lf falls back to copying and then deletes the
|
||||||
original files if there are no errors.
|
original files if there are no errors.
|
||||||
Operation errors are shown in the message line as well as the log file
|
Operation errors are shown in the message line as well as the log file
|
||||||
and they do not preemptively finish the corresponding file operation.
|
and they do not prematurely terminate the corresponding file operation.
|
||||||
.PP
|
.PP
|
||||||
File operations can be performed on the currently selected file or on
|
File operations can be performed on the currently selected file or on
|
||||||
multiple files by selecting them first.
|
multiple files by selecting them first.
|
||||||
@@ -1786,13 +1786,13 @@ only a single match.
|
|||||||
The default values of these two options are set to jump to the first
|
The default values of these two options are set to jump to the first
|
||||||
file with the given initial.
|
file with the given initial.
|
||||||
.PP
|
.PP
|
||||||
Some options effect both searching and finding.
|
Some options affect both searching and finding.
|
||||||
You can disable \f[CR]wrapscan\f[R] option to prevent searches from
|
You can disable \f[CR]wrapscan\f[R] option to prevent searches from
|
||||||
being wrapped around at the end of the file list.
|
being wrapped around at the end of the file list.
|
||||||
You can disable \f[CR]ignorecase\f[R] option to match cases in the
|
You can disable \f[CR]ignorecase\f[R] option to match cases in the
|
||||||
pattern and the filename.
|
pattern and the filename.
|
||||||
This option is already automatically overridden if the pattern contains
|
This option is already automatically overridden if the pattern contains
|
||||||
upper\-case characters.
|
uppercase characters.
|
||||||
You can disable \f[CR]smartcase\f[R] option to disable this behavior.
|
You can disable \f[CR]smartcase\f[R] option to disable this behavior.
|
||||||
Two similar options \f[CR]ignoredia\f[R] and \f[CR]smartdia\f[R] are
|
Two similar options \f[CR]ignoredia\f[R] and \f[CR]smartdia\f[R] are
|
||||||
provided to control matching diacritics in Latin letters.
|
provided to control matching diacritics in Latin letters.
|
||||||
@@ -1813,7 +1813,7 @@ It is possible to use different command types:
|
|||||||
cmd open &xdg\-open $f
|
cmd open &xdg\-open $f
|
||||||
.EE
|
.EE
|
||||||
.PP
|
.PP
|
||||||
You may want to use either file extensions or mime types from
|
You may want to use either file extensions or MIME types from
|
||||||
\f[CR]file\f[R] command:
|
\f[CR]file\f[R] command:
|
||||||
.IP
|
.IP
|
||||||
.EX
|
.EX
|
||||||
@@ -1863,13 +1863,13 @@ lf previews files on the preview pane by printing the file until the end
|
|||||||
or until the preview pane is filled.
|
or until the preview pane is filled.
|
||||||
This output can be enhanced by providing a custom preview script for
|
This output can be enhanced by providing a custom preview script for
|
||||||
filtering.
|
filtering.
|
||||||
This can be used to highlight source codes, list contents of archive
|
This can be used to highlight source code, list contents of archive
|
||||||
files or view PDF or image files to name a few.
|
files or view PDF or image files to name a few.
|
||||||
For coloring lf recognizes ANSI escape codes.
|
For coloring lf recognizes ANSI escape codes.
|
||||||
.PP
|
.PP
|
||||||
To use this feature, you need to set the value of \f[CR]previewer\f[R]
|
To use this feature, you need to set the value of \f[CR]previewer\f[R]
|
||||||
option to the path of an executable file.
|
option to the path of an executable file.
|
||||||
Five arguments are passed to the file, (1) current file name, (2) width,
|
Five arguments are passed to the file, (1) current filename, (2) width,
|
||||||
(3) height, (4) horizontal position, and (5) vertical position of
|
(3) height, (4) horizontal position, and (5) vertical position of
|
||||||
preview pane respectively.
|
preview pane respectively.
|
||||||
The output of the execution is printed in the preview pane.
|
The output of the execution is printed in the preview pane.
|
||||||
@@ -1892,7 +1892,7 @@ map i $LESSOPEN=\(aq| \(ti/.config/lf/pv.sh %s\(aq less \-R $f
|
|||||||
Since this script is called for each file selection change it needs to
|
Since this script is called for each file selection change it needs to
|
||||||
be as efficient as possible and this responsibility is left to the user.
|
be as efficient as possible and this responsibility is left to the user.
|
||||||
You may use file extensions to determine the type of file more
|
You may use file extensions to determine the type of file more
|
||||||
efficiently compared to obtaining mime types from \f[CR]file\f[R]
|
efficiently compared to obtaining MIME types from \f[CR]file\f[R]
|
||||||
command.
|
command.
|
||||||
Extensions can then be used to match cleanly within a conditional:
|
Extensions can then be used to match cleanly within a conditional:
|
||||||
.IP
|
.IP
|
||||||
@@ -2060,7 +2060,7 @@ Colors are set in the following order:
|
|||||||
.IP "1." 3
|
.IP "1." 3
|
||||||
default
|
default
|
||||||
.IP "2." 3
|
.IP "2." 3
|
||||||
LSCOLORS (Mac/BSD ls)
|
LSCOLORS (macOS/BSD ls)
|
||||||
.IP "3." 3
|
.IP "3." 3
|
||||||
LS_COLORS (GNU ls)
|
LS_COLORS (GNU ls)
|
||||||
.IP "4." 3
|
.IP "4." 3
|
||||||
@@ -2243,7 +2243,7 @@ ex=01;32:\(rs
|
|||||||
.PP
|
.PP
|
||||||
The \f[CR]ln\f[R] entry supports the special value \f[CR]target\f[R],
|
The \f[CR]ln\f[R] entry supports the special value \f[CR]target\f[R],
|
||||||
which will use the link target to select a style.
|
which will use the link target to select a style.
|
||||||
File name rules will still apply based on the link\(aqs name \-\- this
|
Filename rules will still apply based on the link\(aqs name \-\- this
|
||||||
mirrors GNU\(aqs \f[CR]ls\f[R] and \f[CR]dircolors\f[R] behavior.
|
mirrors GNU\(aqs \f[CR]ls\f[R] and \f[CR]dircolors\f[R] behavior.
|
||||||
Having such a long variable definition in a shell configuration file
|
Having such a long variable definition in a shell configuration file
|
||||||
might be undesirable.
|
might be undesirable.
|
||||||
@@ -2266,11 +2266,11 @@ CONFIGURATION section
|
|||||||
.UE \c
|
.UE \c
|
||||||
).
|
).
|
||||||
The variable uses the same syntax as \f[CR]LS_COLORS/LF_COLORS\f[R].
|
The variable uses the same syntax as \f[CR]LS_COLORS/LF_COLORS\f[R].
|
||||||
Instead of colors, you should put a single characters as values of
|
Instead of colors, you should use single characters or symbols as
|
||||||
entries.
|
values.
|
||||||
The \f[CR]ln\f[R] entry supports the special value \f[CR]target\f[R],
|
The \f[CR]ln\f[R] entry supports the special value \f[CR]target\f[R],
|
||||||
which will use the link target to select a icon.
|
which will use the link target to select a icon.
|
||||||
File name rules will still apply based on the link\(aqs name \-\- this
|
Filename rules will still apply based on the link\(aqs name \-\- this
|
||||||
mirrors GNU\(aqs \f[CR]ls\f[R] and \f[CR]dircolors\f[R] behavior.
|
mirrors GNU\(aqs \f[CR]ls\f[R] and \f[CR]dircolors\f[R] behavior.
|
||||||
The icons file (refer to the \c
|
The icons file (refer to the \c
|
||||||
.UR https://github.com/gokcehan/lf/blob/master/doc.md#configuration
|
.UR https://github.com/gokcehan/lf/blob/master/doc.md#configuration
|
||||||
@@ -2278,14 +2278,12 @@ CONFIGURATION section
|
|||||||
.UE \c
|
.UE \c
|
||||||
) should consist of whitespace\-separated arrays with a \f[CR]#\f[R]
|
) should consist of whitespace\-separated arrays with a \f[CR]#\f[R]
|
||||||
character to start comments until the end of the line.
|
character to start comments until the end of the line.
|
||||||
Each line should contain 1\-3 columns, first column is filetype or
|
Each line should contain 1\-3 columns: a file type or file name pattern,
|
||||||
filename pattern, second column is the icon, third column is an optional
|
the icon, and an optional icon color.
|
||||||
icon color.
|
Using only one column disables all rules for that type or name.
|
||||||
If there is only one column, means to disable rule for this filetype or
|
|
||||||
pattern.
|
|
||||||
Do not forget to add \f[CR]set icons true\f[R] to your \f[CR]lfrc\f[R]
|
Do not forget to add \f[CR]set icons true\f[R] to your \f[CR]lfrc\f[R]
|
||||||
to see the icons.
|
to see the icons.
|
||||||
Default values are as follows given with their matching order in lf:
|
Default values are listed below in the order lf matches them:
|
||||||
.IP
|
.IP
|
||||||
.EX
|
.EX
|
||||||
ln l
|
ln l
|
||||||
|
|||||||
Reference in new issue
Block a user