Skip to content

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

TypeScript

mods/diff: the untracked file's stage hint is unquoted, as the built-in words it

poteat23e30f0c17c5
diff --git a/mods/diff/hooks/git/git-words/git-words.ts b/mods/diff/hooks/git/git-words/git-words.ts
index 3d18502b..4d5c6ef2 100644
--- a/mods/diff/hooks/git/git-words/git-words.ts
+++ b/mods/diff/hooks/git/git-words/git-words.ts
@@ -2,7 +2,8 @@ import type Backend from '../../backend'
/**
* The pane's git words: compared with HEAD, read by `git diff`, untracked
- * files listed by git and staged with `git add ':/…'` (DiffDetailView's).
+ * files listed by git and staged with `git add :/…`, unquoted as
+ * DiffDetailView words it.
*/
export const GIT_WORDS: Backend.BackendWords = Object.freeze({
base: 'HEAD',
@@ -11,7 +12,7 @@ export const GIT_WORDS: Backend.BackendWords = Object.freeze({
untrackedNoteOf: (path: string, isPasteable: boolean) => [
'New file not yet staged.',
isPasteable
- ? `Run \`git add ':/${path}'\` to see line counts.`
+ ? `Run \`git add :/${path}\` to see line counts.`
: 'Stage it with git add to see line counts.',
],
})
diff --git a/mods/diff/hooks/views/detail/placeholder-of/safe-pathspec-pattern/safe-pathspec-pattern.ts b/mods/diff/hooks/views/detail/placeholder-of/safe-pathspec-pattern/safe-pathspec-pattern.ts
index 61cf39a7..cbc652f1 100644
--- a/mods/diff/hooks/views/detail/placeholder-of/safe-pathspec-pattern/safe-pathspec-pattern.ts
+++ b/mods/diff/hooks/views/detail/placeholder-of/safe-pathspec-pattern/safe-pathspec-pattern.ts
@@ -1,6 +1,7 @@
/**
- * A file name safe to paste into a stage command in any shell (POSIX,
- * PowerShell, cmd): letters and digits of any script and `._/@+-` only.
+ * A file name safe to paste, unquoted, into a stage command in any shell
+ * (POSIX, PowerShell, cmd): letters and digits of any script and `._/@+-`
+ * only.
*
* No quote of any kind, no separator and no substitution can ride in it.
*/