chatccc 0.2.250 → 0.2.252

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,8 +1,8 @@
1
- ## macOS Command-Line Notes
2
-
3
- You are running on macOS. run_command executes through zsh, a POSIX shell. Quoting follows standard POSIX conventions (the same habits you already know from bash):
4
-
5
- - Double quotes are stripped and group an argument containing spaces: `echo "hello world"` prints `hello world`.
6
- - Single quotes are literal quoting characters: `'a b'` is a single argument `a b`.
7
- - Backticks and `$(...)` perform command substitution; quote them if you need literal text.
8
- - Paths use `/` separators and `~` expands to the home directory.
1
+ ## macOS 命令行提示
2
+
3
+ 你运行在 macOS 上。run_command 通过 zshPOSIX shell)执行。引号遵循标准 POSIX 约定(与你在 bash 中已有的习惯相同):
4
+
5
+ - 双引号会被剥离并用于组合含空格参数:`echo "hello world"` 打印 `hello world`。
6
+ - 单引号是字面量引用字符:`'a b'` 是单个参数 `a b`。
7
+ - 反引号和 `$(...)` 执行命令替换;需要字面文本时请加引号。
8
+ - 路径使用 `/` 分隔符,`~` 展开为主目录。
@@ -1,8 +1,8 @@
1
- ## Linux Command-Line Notes
2
-
3
- You are running on Linux. run_command executes through a POSIX shell (bash/sh). Quoting follows standard POSIX conventions (the same habits you already know from bash):
4
-
5
- - Double quotes are stripped and group an argument containing spaces: `echo "hello world"` prints `hello world`.
6
- - Single quotes are literal quoting characters: `'a b'` is a single argument `a b`.
7
- - Backticks and `$(...)` perform command substitution; quote them if you need literal text.
8
- - Paths use `/` separators and `~` expands to the home directory.
1
+ ## Linux 命令行提示
2
+
3
+ 你运行在 Linux 上。run_command 通过 POSIX shellbash/sh)执行。引语遵循标准 POSIX 约定(与你在 bash 中已有的习惯相同):
4
+
5
+ - 双引号会被剥离并用于组合含空格参数:`echo "hello world"` 打印 `hello world`。
6
+ - 单引号是字面量引用字符:`'a b'` 是单个参数 `a b`。
7
+ - 反引号和 `$(...)` 执行命令替换;需要字面文本时请加引号。
8
+ - 路径使用 `/` 分隔符,`~` 展开为主目录。
@@ -1,11 +1,11 @@
1
- ## Windows Command-Line Notes
2
-
3
- You are running on Windows. run_command executes through cmd.exe, not bash. cmd quoting differs from bash and breaks common habits:
4
-
5
- - Double quotes are NOT stripped: `echo "hello world"` prints `"hello world"` (quotes included), and `"a b" "c"` passes the literal arguments `"a b"` and `"c"` (quotes included) to the program.
6
- - Single quotes are NOT quoting characters in cmd.exe: `'a b'` is parsed as two arguments (`'a` and `b'`).
7
- - Multi-line or quote-heavy inline scripts (python -c "...\n...", ssh host "bash -c '...'") frequently break under cmd quoting; write the script to a temporary file and execute that file instead.
8
- - PowerShell-only syntax (Get-Item, 2>$null, Select-Object) is unavailable; the shell is cmd.exe unless you explicitly invoke powershell.
9
- - To pass an argument containing spaces, use double quotes and expect the quotes to reach the program literally; when the target accepts file input, prefer writing the value to a file.
10
- - Cross-drive `cd` in cmd.exe requires `/d`: `cd /d D:\repo` changes drive and directory, while plain `cd D:\repo` only prints the target path and leaves you on the old drive, so later commands run in the wrong directory.
11
- - npm 11.x ignores `--prefix` for `npm publish` on Windows: `npm --prefix D:/repo publish` publishes the package of the CURRENT directory, not the one in `--prefix`. Always `cd /d` into the package directory first, then run `npm publish` there.
1
+ ## Windows 命令行提示
2
+
3
+ 你运行在 Windows 上。run_command 通过 cmd.exe 执行,而不是 bashcmd 的引号规则与 bash 不同,容易踩坑:
4
+
5
+ - 双引号不会被剥离:`echo "hello world"` 会原样打印 `"hello world"`(含引号),`"a b" "c"` 会把带引号的字面量 `"a b"` `"c"` 传给程序。
6
+ - 单引号在 cmd.exe 中不是引用字符:`'a b'` 会被解析成两个参数(`'a` `b'`)。
7
+ - 多行或引号密集的内联脚本(python -c "...\n...", ssh host "bash -c '...'")在 cmd 引号规则下经常失败;把脚本写入临时文件再执行该文件。
8
+ - PowerShell 专用语法(Get-Item2>$nullSelect-Object)不可用;除非显式调用 powershell,否则 shell cmd.exe
9
+ - 传含空格参数时用双引号,并预期引号会原样到达程序;当目标接受文件输入时,优先把值写入文件。
10
+ - cmd.exe 跨盘 `cd` 需要 `/d`:`cd /d D:\repo` 才真正切换盘符和目录;裸 `cd D:\repo` 只打印目标路径、停留在原盘,后续命令会在错误的目录执行。
11
+ - npm 11.x Windows 上忽略 `--prefix` `npm publish` 的作用:`npm --prefix D:/repo publish` 发布的是**当前目录**的包,而不是 `--prefix` 指向的目录。务必先 `cd /d` 进入包目录,再执行 `npm publish`。