File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change 90
90
--- Additionally you can define:
91
91
--- - `title` a static title for example "File Preview"
92
92
--- - `dyn_title(self, entry)` a dynamic title function which gets called
93
+ --- - `env` table: define environment variables to forward to the terminal
94
+ --- process. Example:
95
+ --- - `{ ['PAGER'] = '', ['MANWIDTH'] = 50 }`
93
96
--- when config value `dynamic_preview_title = true`
94
97
---
95
98
--- It's an easy way to get your first previewer going and it integrates well
96
99
--- with `bat` and `less`. Providing out of the box scrolling if the command
97
100
--- uses less.
98
101
---
99
- --- Furthermore, it will forward all `config.set_env` environment variables to
102
+ --- Furthermore, if `env` is not set, it will forward all `config.set_env` environment variables to
100
103
--- that terminal process.
101
104
previewers .new_termopen_previewer = term_previewer .new_termopen_previewer
102
105
Original file line number Diff line number Diff line change @@ -202,7 +202,7 @@ previewers.new_termopen_previewer = function(opts)
202
202
203
203
local term_opts = {
204
204
cwd = opts .cwd or vim .loop .cwd (),
205
- env = conf .set_env ,
205
+ env = opts . env or conf .set_env ,
206
206
}
207
207
208
208
local cmd = opts .get_command (entry , status )
You can’t perform that action at this time.
0 commit comments