相关疑难解决方法(0)

Zsh 替代形式的复杂命令示例

请您提供有关 zsh 文档这一部分的见解。我在这个文档上花了很长时间,但机器人可以说清楚:http: //zsh.sourceforge.net/Doc/Release/Shell-Grammar.html#Alternate-Forms-For-Complex-Commands

我正在寻找所有命令的清晰示例if for foreach while until repeat case select function

zsh

2
推荐指数
1
解决办法
758
查看次数

zsh 中的 some_variable 与 some-variable

为什么看似zsh明白要做什么some_variable=1 command,却又不明白some-variable=1 command?例如:$ fs_screen=1 mpv --fs-screen=${fs_screen} someFile.mp4工作正常,但$ fs-screen=1 mpv --fs-screen=${fs-screen} someFile.mp4结果是zsh: command not found: fs-screen=1

\n

我深入研究了 zsh 文档,发现了我认为的问题所在。摘自https://zsh.sourceforge.io/Doc/Release/Shell-Grammar.html#Precommand-Modifiers

\n
A simple command may be preceded by a precommand modifier, which will alter how the command is interpreted. These modifiers are shell builtin commands with the exception of nocorrect which is a reserved word.\n\n-\nThe command is executed with a \xe2\x80\x98-\xe2\x80\x99 prepended to its argv[0] string.\n
Run Code Online (Sandbox Code Playgroud)\n

但是,我在任何地方都找不到有关此内容的更多信息。它的目的是什么,是否可以禁用它,以便我可以使用 …

zsh environment-variables shell-builtin variable

1
推荐指数
1
解决办法
159
查看次数