# Shell 别名

> 让 pi 在非交互式 bash 中启用你的 shell 别名的配置方法。

---

LLMS 索引： [llms.txt](/llms.txt)

---

Pi 以非交互模式（`bash -c`）运行 bash，默认不会展开别名。

要启用你的 shell 别名，请在 `~/.pi/agent/settings.json` 中添加：

```json
{
  "shellCommandPrefix": "shopt -s expand_aliases\neval \"$(grep '^alias ' ~/.zshrc)\""
}
```

请根据你的 shell 配置调整路径（`~/.zshrc`、`~/.bashrc` 等）。

---

反链：

- [快速开始](/book/pi/quickstart/)
