mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-08-12 09:15:41 +02:00
929 B
929 B
fish
The Friendly Interactive SHell, 一个设计为用户友好的命令行解释器。 更多信息:https://fishshell.com/docs/current/cmds/fish.html.
- 启动交互式 shell 会话:
fish
- 启动不加载启动配置的交互式 shell 会话:
fish {{[-N|--no-config]}}
- 执行特定命令:
fish {{[-c|--command]}} "{{echo 'fish is executed'}}"
- 执行特定脚本:
fish {{路径/到/脚本.fish}}
- 检查特定脚本是否有语法错误:
fish {{[-N|--no-execute]}} {{路径/到/脚本.fish}}
- 从
stdin
执行特定命令:
{{echo "echo 'fish is executed'"}} | fish
- 在专用模式下启动交互式 shell 会话,其中 shell 不会访问旧历史记录或保存新历史记录:
fish {{[-P|--private]}}
- 定义并导出一个在 shell 重启后持续存在的环境变量(内置):
set {{[-U|--universal]}} {{[-x|--export]}} {{变量名}} {{变量值}}