Repository navigation
Conversation
A command configured with `shell = true` rendered with a newline in the
middle of it and a quote on the wrong side of the space, so the label
confirmation prompt broke across two lines and showed `/bin/sh -c'`
before the command itself. It now reads `sh -c 'git rev-parse
--show-toplevel'`, and arguments are shell-quoted so a multi-word
argument stays one token instead of looking like two. Every message that
names a command picks this up: label prompts and failures, tool spawn
errors, and custom parameter formatter errors.
JP also logs an INFO line naming the editor it is about to open, so a
trace shows which program was handed the terminal:
```json
{"message":"Opening configured editor.","editor":"nvim"}
```
Without it, an editor that exits without touching the draft is
indistinguishable from a user who saved an empty file. A conversation
carrying `editor.cmd = "true"` from a non-interactive run drops every
query as empty and says nothing about why.
`CommandConfig` splits the two jobs its `Display` was serving.
`shell_command_line` returns the string passed to `sh -c`, and is what
the editor, tool, and label executors call; `Display` is the readable
form, distinct enough now that spawning through it would fail visibly
rather than work by accident until the two drifted apart.
Signed-off-by: Jean Mertz <git@jeanmertz.com>
Signed-off-by: Jean Mertz <git@jeanmertz.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A command configured with
shell = truerendered with a newline in the middle of it and a quote on the wrong side of the space, so the label confirmation prompt broke across two lines and showed/bin/sh -c'before the command itself. It now readssh -c 'git rev-parse --show-toplevel', and arguments are shell-quoted so a multi-word argument stays one token instead of looking like two. Every message that names a command picks this up: label prompts and failures, tool spawn errors, and custom parameter formatter errors.JP also logs an INFO line naming the editor it is about to open, so a trace shows which program was handed the terminal:
{"message":"Opening configured editor.","editor":"nvim"}Without it, an editor that exits without touching the draft is indistinguishable from a user who saved an empty file. A conversation carrying
editor.cmd = "true"from a non-interactive run drops every query as empty and says nothing about why.CommandConfigsplits the two jobs itsDisplaywas serving.shell_command_linereturns the string passed tosh -c, and is what the editor, tool, and label executors call;Displayis the readable form, distinct enough now that spawning through it would fail visibly rather than work by accident until the two drifted apart.