diff --git a/pkg/commands/git_commands/diff.go b/pkg/commands/git_commands/diff.go index abef0f31c..d5cd75bac 100644 --- a/pkg/commands/git_commands/diff.go +++ b/pkg/commands/git_commands/diff.go @@ -34,7 +34,7 @@ const metadataHandshake = "\x1b]1717" // caches it per pager. // // No PTY is needed: git needs a terminal to decide to invoke a pager, but the pager -// itself emits the handshake whenever OSC1717_METADATA is set, so we can run it +// itself emits the handshake whenever OSC1717 is set, so we can run it // directly with empty input. // // A git-config external diff driver (useExternalDiffGitConfig) is chosen per file via @@ -75,7 +75,7 @@ func (self *DiffCommands) externalDiffEmitsMetadata(extDiffCmd string) bool { } func (self *DiffCommands) probeEmitsMetadata(cmdObj *oscommands.CmdObj) bool { - cmdObj.AddEnvVars("OSC1717_METADATA=V1") + cmdObj.AddEnvVars("OSC1717=V1") // The pager may exit non-zero on the synthetic input; we only care about whether // it emitted the handshake first, and the output is captured either way. output, _ := cmdObj.RunWithOutput() diff --git a/pkg/gui/pty.go b/pkg/gui/pty.go index 566baab83..f48a6af9d 100644 --- a/pkg/gui/pty.go +++ b/pkg/gui/pty.go @@ -105,7 +105,7 @@ func (gui *Gui) newPtyTask(view *gocui.View, cmd *exec.Cmd, prefix string) error // an OSC sequence we can read back (see diff-line-metadata-notes.md). A // pager that doesn't understand it ignores the variable, so this is safe to // set unconditionally. - cmd.Env = append(cmd.Env, "OSC1717_METADATA=V1") + cmd.Env = append(cmd.Env, "OSC1717=V1") manager := gui.getManager(view)