diff options
| author | theimpostor <sahirhoda@gmail.com> | 2024-08-18 16:46:40 -0500 |
|---|---|---|
| committer | theimpostor <sahirhoda@gmail.com> | 2024-08-18 16:46:40 -0500 |
| commit | b7e4a9fc0859986f23d682c5de1e008c697708d3 (patch) | |
| tree | 0a69c9b91468a97debfb2ffa993803e5e838f009 /main.go | |
| parent | 2f42995ff3cceea702f9d92bb1d505600955dcd4 (diff) | |
add check for zellij, unsupported with paste
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -25,6 +25,7 @@ var ( oscClose string = "\a" isScreen bool isTmux bool + isZellij bool verboseFlag bool logfileFlag string deviceFlag string @@ -90,6 +91,9 @@ func initLogging() (logfile *os.File) { } func identifyTerm() { + if os.Getenv("ZELLIJ") != "" { + isZellij = true + } if os.Getenv("TMUX") != "" { isTmux = true } else if ti, err := tcell.LookupTerminfo(os.Getenv("TERM")); err != nil { @@ -163,6 +167,9 @@ func copy(fnames []string) error { } func paste() error { + if isZellij { + return fmt.Errorf("paste unsupported under zellij, unset ZELLIJ env var to force") + } timeout := time.Duration(timeoutFlag*1_000_000_000) * time.Nanosecond slog.Debug(fmt.Sprintf("Beginning osc52 paste operation, timeout: %s", timeout)) if data, err := func() ([]byte, error) { |
