Skip to content

Commit 10b8a82

Browse files
jamestrewGithub Actions
andauthored
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>
1 parent 3264f0a commit 10b8a82

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

doc/telescope.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3855,13 +3855,16 @@ previewers.new_termopen_previewer() *telescope.previewers.new_termopen_previewer
38553855
- `title` a static title for example "File Preview"
38563856
- `dyn_title(self, entry)` a dynamic title function which gets called when
38573857
config value `dynamic_preview_title = true`
3858+
- `env` table: define environment variables to forward to the terminal
3859+
process. Example:
3860+
- `{ ['PAGER'] = '', ['MANWIDTH'] = 50 }`
38583861

38593862
It's an easy way to get your first previewer going and it integrates well
38603863
with `bat` and `less`. Providing out of the box scrolling if the command
38613864
uses less.
38623865

3863-
Furthermore, it will forward all `config.set_env` environment variables to
3864-
that terminal process.
3866+
Furthermore, if `env` is not set, it will forward all `config.set_env`
3867+
environment variables to that terminal process.
38653868

38663869

38673870

lua/telescope/previewers/init.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,10 @@ end
9090
--- Additionally you can define:
9191
--- - `title` a static title for example "File Preview"
9292
--- - `dyn_title(self, entry)` a dynamic title function which gets called
93+
--- when config value `dynamic_preview_title = true`
9394
--- - `env` table: define environment variables to forward to the terminal
9495
--- process. Example:
9596
--- - `{ ['PAGER'] = '', ['MANWIDTH'] = 50 }`
96-
--- when config value `dynamic_preview_title = true`
9797
---
9898
--- It's an easy way to get your first previewer going and it integrates well
9999
--- with `bat` and `less`. Providing out of the box scrolling if the command

0 commit comments

Comments
 (0)