terminal-opener
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseTerminal Opener
终端启动工具
Use to preserve an executable and every argument as
separate process entries. Never interpolate a shell command string. Keep every
spawn on . Default to a non-launching plan. Use only
after the user explicitly requests a real window and the argv has been reviewed.
The launched process inherits the full environment of the calling process,
including secret-bearing variables. The launcher does not filter the
environment. Run it from a shell whose environment is safe to expose to the
target command.
scripts/open-terminal.jsshell: false--launch使用将可执行文件及其每个参数保留为独立的进程条目。切勿拼接Shell命令字符串。所有进程启动都保持配置。默认采用非启动模式。仅当用户明确请求真实窗口且参数数组(argv)已审核通过后,才使用参数。启动的进程会继承调用进程的完整环境,包括包含密钥的变量。启动器不会过滤环境变量,请从环境安全的Shell中运行它,确保目标命令可以安全访问这些环境变量。
scripts/open-terminal.jsshell: false--launchLaunch a command
启动命令
Pass launcher options before , then pass exactly one executable followed by
its argument array:
--bash
node skills/terminal-opener/scripts/open-terminal.js \
--launch \
--cwd /absolute/host/path \
-- ssh -t example.test command-with-argumentsRun normal mode first. Let WezTerm try its mux with a new window, then let the
launcher fall back to a detached process if the mux is not
available. When fallback is used, read from JSON output (or the
human-readable failure line) to diagnose why the mux path failed.
wezterm startmuxFailure在之前传入启动器选项,然后传入一个可执行文件及其参数数组:
--bash
node skills/terminal-opener/scripts/open-terminal.js \
--launch \
--cwd /absolute/host/path \
-- ssh -t example.test command-with-arguments先运行普通模式。让WezTerm尝试通过其多路复用器(mux)打开新窗口,如果多路复用器不可用,则启动器会回退到分离的进程。使用回退模式时,可从JSON输出(或人类可读的失败信息行)中读取来诊断多路复用器路径失败的原因。
wezterm startmuxFailureRecover from terminal configuration
从终端配置中恢复
Add or when user configuration or mux state may
interfere with the requested command. Start a detached WezTerm process with:
--recover--standalonetext
--skip-config start --always-new-processExpect recovery mode to skip all user terminal configuration intentionally.
当用户配置或多路复用器状态可能干扰请求的命令时,添加或参数。启动一个分离的WezTerm进程,使用以下参数:
--recover--standalonetext
--skip-config start --always-new-process恢复模式会有意跳过所有用户终端配置。
Inspect before launch
启动前检查
Omit (or add ) and add to inspect the exact
executable, argv, working directory, terminal adapter, primary launch, and
fallback without opening a window. Treat the JSON plan as the composition
boundary for callers.
--launch--dry-run--jsonRun without a command to probe terminal availability. Follow
the returned when the adapter is missing or unsupported. Use WezTerm
for the current adapter; treat other requested terminals as unsupported plans,
not as commands to execute.
--detect --jsonaction省略(或添加)并添加参数,即可在不打开窗口的情况下查看确切的可执行文件、参数数组、工作目录、终端适配器、主启动方案和回退方案。将JSON方案作为调用方的组合边界。
--launch--dry-run--json运行且不传入命令,即可探测终端可用性。当适配器缺失或不被支持时,按照返回的操作。当前使用WezTerm作为适配器;其他请求的终端视为不支持的方案,而非可执行的命令。
--detect --jsonaction