update doc

This commit is contained in:
Gokcehan committed 2020-12-11 17:07:34 +03:00
1 parent 6f525ba047
commit cae9ada56c
3 files changed
+31

No files matched your search

+10
View File
@@ -1114,6 +1114,11 @@ You may want to use the same script in your pager mapping as well if any:
set previewer ~/.config/lf/pv.sh
map i $~/.config/lf/pv.sh $f | less -R
For 'less' pager, you may instead utilize 'LESSOPEN' mechanism so that useful information about the file such as the full path of the file can be displayed in the statusline below:
set previewer ~/.config/lf/pv.sh
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.
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:
@@ -1136,6 +1141,11 @@ This is especially relevant for big files.
lf automatically closes the previewer script output pipe with a SIGPIPE when enough lines are read.
When everything else fails, you can make use of the height argument to only feed the first portion of the file to a program for preview.
You may also use an existing preview filter as you like.
Your system may already come with a preview filter named 'lesspipe'.
These filters may have a mechanism to add user customizations as well.
See the related documentations for more information.
Changing Directory
lf changes the working directory of the process to the current directory so that shell commands always work in the displayed directory.