diff --git a/diff-line-metadata-osc-spec.md b/diff-line-metadata-osc-spec.md index 3c0be628f..f754786b7 100644 --- a/diff-line-metadata-osc-spec.md +++ b/diff-line-metadata-osc-spec.md @@ -76,7 +76,7 @@ stays in the pager, which is the only component that has it. ## 3. Negotiation handshake ``` -EMIT_OSC1717_METADATA = V1[,V2,…] +OSC1717_METADATA = V1[,V2,…] ``` - The **host** sets this environment variable on the pager subprocess to the list @@ -404,7 +404,7 @@ mapping; recorded as a v2 candidate, not taken (§9). in the large empty 1400–5000 band (only iTerm2's `1337` is nearby). There is no central registry, so this is "verified unused across the terminals that matter," not "allocated." If you know of a terminal that interprets `1717`, please say so. -2. **The env-var name and grammar** (`EMIT_OSC1717_METADATA=V1,…`). +2. **The env-var name and grammar** (`OSC1717_METADATA=V1,…`). 3. **The token-vs-line mismatch** (§8) — should there be an `m` type, or is host-side inference the right home for it? 4. **Can your pager actually produce all four fields per region?** In particular diff --git a/pkg/commands/git_commands/diff.go b/pkg/commands/git_commands/diff.go index f47097465..abef0f31c 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 EMIT_OSC1717_METADATA is set, so we can run it +// itself emits the handshake whenever OSC1717_METADATA 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("EMIT_OSC1717_METADATA=V1") + cmdObj.AddEnvVars("OSC1717_METADATA=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 65086c8f6..566baab83 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, "EMIT_OSC1717_METADATA=V1") + cmd.Env = append(cmd.Env, "OSC1717_METADATA=V1") manager := gui.getManager(view)