自维护
pinset self shell
生成当前 shell 的 PATH 接入片段,让终端直接使用 Pinset 管理的工具命令。
在 GitHub 查看源文档 ↗什么时候用
安装后直接运行 node 等仍未进入 Pinset 时使用。输出片段需在当前 shell 执行,或自行加入启动配置。
示例
pinset self shell bash
eval "$(pinset self shell bash)"
第一条输出形式示例:
export PATH='/example/pinset/v3/bin':"$PATH"
PowerShell 当前会话使用 pinset self shell powershell | Invoke-Expression。
行为细节
只生成文本,不写用户 profile、不联网、不安装工具。把受管目录放在 PATH 前面;CLI 目录仍需按安装说明接入。永久生效由你保存到 shell 启动文件。
参数、退出码与常见错误
| 参数 | 含义 |
|---|---|
<bash|zsh|fish|powershell> | 必填,目标 shell。 |
成功返回 0,基础环境错误为 1,无效 shell 为 2。未生效时检查 PATH 顺序和 shell 命令缓存。
/docs/commands/self-shell适用版本 · Pinset 3.1.0