feat(vscode): auto-manage remote.SSH.path on macOS + friendly no-destination usage#547
Open
DevSecNinja wants to merge 1 commit into
Open
feat(vscode): auto-manage remote.SSH.path on macOS + friendly no-destination usage#547DevSecNinja wants to merge 1 commit into
DevSecNinja wants to merge 1 commit into
Conversation
…ination usage Two follow-ups on top of the VS Code token forwarding: - chezmoi modify_ script for macOS VS Code settings.json sets `remote.SSH.path` to the copilot-ssh-proxy helper automatically, removing the manual step. It is safety-first: sets only that one key, emits the file byte-for-byte unchanged when the value already matches (no churn), and NEVER rewrites a settings.json that isn't strict JSON (comments/trailing commas) - it prints a manual hint instead. Scoped to darwin via .chezmoiignore. - copilot-ssh / copilot_ssh now print a friendly usage message when called with no destination, instead of falling through to ssh's raw usage dump. - tests: add modify-vscode-settings.bats (create/add/no-churn/JSONC-safe/update) and a no-destination case for copilot-ssh.bats. - docs/copilot-cli.md: document the auto-managed macOS setting + manual path for other OSes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.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.
Description
Two follow-ups on top of #546 (VS Code token forwarding). Stacked on
feat/copilot-cli-vscode— review/merge #546 first (base will collapse tomainonce #546 merges).modify_script setsremote.SSH.pathin~/Library/Application Support/Code/User/settings.jsonautomatically onchezmoi apply.copilot-ssh/copilot_ssh— a clear usage message when called with no destination, instead of ssh's raw usage dump.Changes
home/Library/Application Support/Code/User/modify_settings.json.tmpl— chezmoimodify_script (macOS-scoped via.chezmoiignore). Safety-first:remote.SSH.path; all other settings preserved;jqcan't parse) — leaves the file untouched and prints a manual hint.copilot-ssh.sh/copilot_ssh.fish— friendly "no destination given" usage message + non-zero exit.docs/copilot-cli.md— document the auto-managed macOS setting and the manual path for other OSes.modify-vscode-settings.bats(create / add-preserving / no-churn / JSONC-safe / update) and a no-destination case incopilot-ssh.bats.Notes
remote.SSH.pathstep.echo/printfare intentional here (themodify_script's stdout is the settings file; consistent with the merged helpers) rather thanlog.sh.Checklist
shellcheck/shfmton changed files;fish -n)