diff options
| author | Pierre Guinoiseau <pierre@guinoiseau.nz> | 2025-04-18 20:35:48 +1200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-18 17:35:48 +0900 |
| commit | af8fe918d863b18160390a79cbf957ee28dead56 (patch) | |
| tree | 9d587756cb284b70180b2edca784ff403f0d4ccd /src/proxy.go | |
| parent | 8ef9dfd9a23486a6ed13c517904aad11c3072bb0 (diff) | |
| download | fzf-af8fe918d863b18160390a79cbf957ee28dead56.tar.gz | |
Disable tmux popup when already running inside one (#4351)
Diffstat (limited to 'src/proxy.go')
| -rw-r--r-- | src/proxy.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/proxy.go b/src/proxy.go index 53a3c265..daeb680b 100644 --- a/src/proxy.go +++ b/src/proxy.go @@ -98,7 +98,8 @@ func runProxy(commandPrefix string, cmdBuilder func(temp string, needBash bool) validIdentifier := regexp.MustCompile(`^[a-zA-Z_][a-zA-Z0-9_]*$`) for _, pairStr := range os.Environ() { pair := strings.SplitN(pairStr, "=", 2) - if validIdentifier.MatchString(pair[0]) { + // TMUX_PANE is never set inside a tmux popup, and should not be set so as to not be detected as a regular tmux pane + if validIdentifier.MatchString(pair[0]) && pair[0] != "TMUX_PANE" { exports = append(exports, fmt.Sprintf("export %s=%s", pair[0], escapeSingleQuote(pair[1]))) } else if strings.HasPrefix(pair[0], "BASH_FUNC_") && strings.HasSuffix(pair[0], "%%") { name := pair[0][10 : len(pair[0])-2] |
