diff options
| author | Junegunn Choi <junegunn.c@gmail.com> | 2025-03-10 18:16:20 +0900 |
|---|---|---|
| committer | Junegunn Choi <junegunn.c@gmail.com> | 2025-03-10 18:18:50 +0900 |
| commit | aefb9a5bc41f92227e4bffa050caca0270b450ba (patch) | |
| tree | 2b8fcaa7b1299309fcd8576ced5e60e5821d3c7b | |
| parent | 8868d7cbb8deefb5e1fe63d404b31771e217ed89 (diff) | |
| download | fzf-aefb9a5bc41f92227e4bffa050caca0270b450ba.tar.gz | |
Nullify unwanted FZF_DEFAULT_* variables in tmux popup
Fix #4298
| -rw-r--r-- | src/proxy.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/proxy.go b/src/proxy.go index 660b0f94..53a3c265 100644 --- a/src/proxy.go +++ b/src/proxy.go @@ -90,9 +90,9 @@ func runProxy(commandPrefix string, cmdBuilder func(temp string, needBash bool) } } - // To ensure that the options are processed by a POSIX-compliant shell, - // we need to write the command to a temporary file and execute it with sh. - var exports []string + // * Write the command to a temporary file and run it with sh to ensure POSIX compliance. + // * Nullify FZF_DEFAULT_* variables as tmux popup may inject them even when undefined. + exports := []string{"FZF_DEFAULT_COMMAND=", "FZF_DEFAULT_OPTS=", "FZF_DEFAULT_OPTS_FILE="} needBash := false if withExports { validIdentifier := regexp.MustCompile(`^[a-zA-Z_][a-zA-Z0-9_]*$`) |
