Files
tldr/pages.zh/common/xonsh.md

29 lines
644 B
Markdown
Raw Permalink 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.

# xonsh
> 基于 Python 的跨平台 Unix 风格的 shell。
> 在 Xonsh 中编写和混合 sh/Python 代码(发音为 conch
> 更多信息:<https://xon.sh>。
- 开始一个交互式 shell 会话:
`xonsh`
- 执行单个命令然后退出:
`xonsh -c "{{command}}"`
- 从脚本文件中运行命令然后退出:
`xonsh {{path/to/script_file.xonsh}}`
- 为 shell 进程定义环境变量:
`xonsh -D{{name1}}={{value1}} -D{{name2}}={{value2}}`
- 加载指定的 `.xonsh``.json` 配置文件:
`xonsh --rc {{path/to/file1.xonsh}} {{path/to/file2.json}}`
- 跳过加载 `.xonshrc` 配置文件:
`xonsh --no-rc`