update doc
This commit is contained in:
parent
f54acae958
commit
af988284a4
8
doc.go
8
doc.go
@ -1149,6 +1149,14 @@ Besides, it is also important that the application is processing the file on the
|
|||||||
This is especially relevant for big files.
|
This is especially relevant for big files.
|
||||||
lf automatically closes the previewer script output pipe with a SIGPIPE when enough lines are read.
|
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.
|
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.
|
||||||
|
Note that some programs may not respond well to SIGPIPE to exit with a non-zero return code and avoid caching.
|
||||||
|
You may trap SIGPIPE in your preview script to avoid error propogation:
|
||||||
|
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
trap "" PIPE
|
||||||
|
|
||||||
|
...
|
||||||
|
|
||||||
You may also use an existing preview filter as you like.
|
You may also use an existing preview filter as you like.
|
||||||
Your system may already come with a preview filter named 'lesspipe'.
|
Your system may already come with a preview filter named 'lesspipe'.
|
||||||
|
11
docstring.go
11
docstring.go
@ -1286,7 +1286,16 @@ reading it to the memory and then do the processing afterwards. This is
|
|||||||
especially relevant for big files. lf automatically closes the previewer
|
especially relevant for big files. lf automatically closes the previewer
|
||||||
script output pipe with a SIGPIPE when enough lines are read. When
|
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
|
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.
|
the first portion of the file to a program for preview. Note that some
|
||||||
|
programs may not respond well to SIGPIPE to exit with a non-zero return code
|
||||||
|
and avoid caching. You may trap SIGPIPE in your preview script to avoid
|
||||||
|
error propogation:
|
||||||
|
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
trap "" PIPE
|
||||||
|
|
||||||
|
...
|
||||||
|
|
||||||
You may also use an existing preview filter as you like. Your system may
|
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
|
already come with a preview filter named 'lesspipe'. These filters may have
|
||||||
|
14
lf.1
14
lf.1
@ -1267,7 +1267,19 @@ Since this script is called for each file selection change it needs to be as eff
|
|||||||
esac
|
esac
|
||||||
.EE
|
.EE
|
||||||
.PP
|
.PP
|
||||||
Another important consideration for efficiency is the use of programs with short startup times for preview. For this reason, 'highlight' is recommended over 'pygmentize' for syntax highlighting. Besides, it is also important that the application is processing the file on the fly rather than first reading it to the memory and then do the processing afterwards. 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.
|
Another important consideration for efficiency is the use of programs with short startup times for preview. For this reason, 'highlight' is recommended over 'pygmentize' for syntax highlighting. Besides, it is also important that the application is processing the file on the fly rather than first reading it to the memory and then do the processing afterwards. 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. Note that some programs may not respond well to SIGPIPE to exit with a non-zero return code and avoid caching. You may trap SIGPIPE in your preview script to avoid error propogation:
|
||||||
|
.PP
|
||||||
|
.EX
|
||||||
|
#!/bin/sh
|
||||||
|
.EE
|
||||||
|
.PP
|
||||||
|
.EX
|
||||||
|
trap "" PIPE
|
||||||
|
.EE
|
||||||
|
.PP
|
||||||
|
.EX
|
||||||
|
...
|
||||||
|
.EE
|
||||||
.PP
|
.PP
|
||||||
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.
|
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.
|
||||||
.SH CHANGING DIRECTORY
|
.SH CHANGING DIRECTORY
|
||||||
|
Loading…
Reference in New Issue
Block a user