Remove environment exports from preview thread (#1354)
This commit is contained in:
1 parent
95b3613a68
commit
2620f492c2
4 files changed
+13
-17
No files matched your search
@@ -673,7 +673,7 @@ Format string of the box drawing characters enabled by the `drawbox` option.
|
||||
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 previously selected file had its preview cache disabled.
|
||||
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.
|
||||
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.
|
||||
Preview cleaning is disabled when the value of this option is left empty.
|
||||
|
||||
cursoractivefmt string (default "\033[7m")
|
||||
@@ -844,7 +844,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.
|
||||
The file should be executable.
|
||||
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.
|
||||
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.
|
||||
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.
|
||||
This means that if the file is selected in the future, the previewer is called once again.
|
||||
|
||||
+7
-6
@@ -704,10 +704,11 @@ Format string of the box drawing characters enabled by the 'drawbox' option.
|
||||
|
||||
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 previously
|
||||
selected file had its preview cache disabled. 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. Preview cleaning is
|
||||
disabled when the value of this option is left empty.
|
||||
selected file had 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. Preview cleaning is disabled when the value of this
|
||||
option is left empty.
|
||||
|
||||
cursoractivefmt string (default "\033[7m")
|
||||
cursorparentfmt string (default "\033[7m")
|
||||
@@ -899,8 +900,8 @@ files and displayed as 'binary'.
|
||||
previewer string (default '') (not filtered if empty)
|
||||
|
||||
Set the path of a previewer file to filter the content of regular files for
|
||||
previewing. The file should be executable. Five arguments are passed to the
|
||||
file, (1) current file name, (2) width, (3) height, (4) horizontal position,
|
||||
previewing. 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. 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. This means that if the
|
||||
|
||||
@@ -825,7 +825,7 @@ Format string of the box drawing characters enabled by the `drawbox` option.
|
||||
cleaner string (default '') (not called if empty)
|
||||
.EE
|
||||
.PP
|
||||
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 previously selected file had its preview cache disabled. 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. Preview cleaning is disabled when the value of this option is left empty.
|
||||
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 previously selected file had 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. Preview cleaning is disabled when the value of this option is left empty.
|
||||
.PP
|
||||
.EX
|
||||
cursoractivefmt string (default "\e033[7m")
|
||||
@@ -1021,7 +1021,7 @@ Show previews of files and directories at the right most pane. If the file has m
|
||||
previewer string (default '') (not filtered if empty)
|
||||
.EE
|
||||
.PP
|
||||
Set the path of a previewer file to filter the content of regular files for previewing. The file should be executable. 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. 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. This means that if the file is selected in the future, the previewer is called once again. Preview filtering is disabled and files are displayed as they are when the value of this option is left empty.
|
||||
Set the path of a previewer file to filter the content of regular files for previewing. 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. 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. This means that if the file is selected in the future, the previewer is called once again. Preview filtering is disabled and files are displayed as they are when the value of this option is left empty.
|
||||
.PP
|
||||
.EX
|
||||
promptfmt string (default "\e033[32;1m%u@%h\e033[0m:\e033[34;1m%d\e033[0m\e033[1m%f\e033[0m")
|
||||
|
||||
@@ -702,13 +702,12 @@ func (nav *nav) previewLoop(ui *ui) {
|
||||
}
|
||||
win := ui.wins[len(ui.wins)-1]
|
||||
if clear && len(gOpts.previewer) != 0 && len(gOpts.cleaner) != 0 && nav.volatilePreview {
|
||||
nav.exportFiles()
|
||||
exportOpts()
|
||||
cmd := exec.Command(gOpts.cleaner, prev,
|
||||
strconv.Itoa(win.w),
|
||||
strconv.Itoa(win.h),
|
||||
strconv.Itoa(win.x),
|
||||
strconv.Itoa(win.y))
|
||||
strconv.Itoa(win.y),
|
||||
path)
|
||||
if err := cmd.Run(); err != nil {
|
||||
log.Printf("cleaning preview: %s", err)
|
||||
}
|
||||
@@ -747,8 +746,6 @@ func (nav *nav) previewDir(dir *dir, win *win) {
|
||||
var reader io.Reader
|
||||
|
||||
if len(gOpts.previewer) != 0 {
|
||||
nav.exportFiles()
|
||||
exportOpts()
|
||||
cmd := exec.Command(gOpts.previewer, dir.path,
|
||||
strconv.Itoa(win.w),
|
||||
strconv.Itoa(win.h),
|
||||
@@ -807,8 +804,6 @@ func (nav *nav) preview(path string, win *win) {
|
||||
var reader io.Reader
|
||||
|
||||
if len(gOpts.previewer) != 0 {
|
||||
nav.exportFiles()
|
||||
exportOpts()
|
||||
cmd := exec.Command(gOpts.previewer, path,
|
||||
strconv.Itoa(win.w),
|
||||
strconv.Itoa(win.h),
|
||||
|
||||
Reference in new issue
Block a user