xpipe/lang/proc/texts/environmentScript_zh.md
2024-04-13 16:23:09 +00:00

9 lines
745 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

## 初始脚本
在执行 shell 的初始文件和配置文件后运行的可选命令。
你可以将其视为普通的 shell 脚本,即使用 shell 在脚本中支持的所有语法。你执行的所有命令都会被 shell 源化并修改环境。因此,如果你设置了一个变量,你就可以在这个 shell 会话中访问这个变量。
### 阻止命令
请注意,当 XPipe 首先在后台内部启动 shell 进程时,需要用户输入的阻塞命令可能会冻结 shell 进程。为避免这种情况,只有当变量 `TERM` 未设置为 `dumb`才调用这些阻塞命令。XPipe 在后台准备 shell 会话时会自动设置变量 `TERM=dumb` ,然后在实际打开终端时设置 `TERM=xterm-256color`