docs(previewer): term_preview env option (#3226)

* docs(previewer): term_preview `env` option

* [docgen] Update doc/telescope.txt
skip-checks: true

---------

Co-authored-by: Github Actions <actions@github>
This commit is contained in:
James Trew
2024-07-26 03:29:57 +00:00
committed by GitHub
parent 3264f0ae9d
commit 10b8a82b04
2 changed files with 6 additions and 3 deletions

View File

@@ -3855,13 +3855,16 @@ previewers.new_termopen_previewer() *telescope.previewers.new_termopen_previewer
- `title` a static title for example "File Preview" - `title` a static title for example "File Preview"
- `dyn_title(self, entry)` a dynamic title function which gets called when - `dyn_title(self, entry)` a dynamic title function which gets called when
config value `dynamic_preview_title = true` config value `dynamic_preview_title = true`
- `env` table: define environment variables to forward to the terminal
process. Example:
- `{ ['PAGER'] = '', ['MANWIDTH'] = 50 }`
It's an easy way to get your first previewer going and it integrates well It's an easy way to get your first previewer going and it integrates well
with `bat` and `less`. Providing out of the box scrolling if the command with `bat` and `less`. Providing out of the box scrolling if the command
uses less. uses less.
Furthermore, it will forward all `config.set_env` environment variables to Furthermore, if `env` is not set, it will forward all `config.set_env`
that terminal process. environment variables to that terminal process.

View File

@@ -90,10 +90,10 @@ end
--- Additionally you can define: --- Additionally you can define:
--- - `title` a static title for example "File Preview" --- - `title` a static title for example "File Preview"
--- - `dyn_title(self, entry)` a dynamic title function which gets called --- - `dyn_title(self, entry)` a dynamic title function which gets called
--- when config value `dynamic_preview_title = true`
--- - `env` table: define environment variables to forward to the terminal --- - `env` table: define environment variables to forward to the terminal
--- process. Example: --- process. Example:
--- - `{ ['PAGER'] = '', ['MANWIDTH'] = 50 }` --- - `{ ['PAGER'] = '', ['MANWIDTH'] = 50 }`
--- when config value `dynamic_preview_title = true`
--- ---
--- It's an easy way to get your first previewer going and it integrates well --- It's an easy way to get your first previewer going and it integrates well
--- with `bat` and `less`. Providing out of the box scrolling if the command --- with `bat` and `less`. Providing out of the box scrolling if the command