Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我将“v”别名为“vim **/*.cpp **/*.hpp **/*.cxx”
问题是,如果我在没有任何 *.cxx 文件的目录中,zsh 会将其视为错误。无论如何告诉zsh创建没有** / * .cxx文件作为“”而不是错误?
听起来你想要:
set -o NULL_GLOB
另一个可能感兴趣的变化是:
set -o CSH_NULL_GLOB
当所有模式都无法扩展时,它们的工作方式略有不同。当至少一个模式成功扩展时,两者是相同的。但是如果没有任何模式扩展,NULL_GLOB仍然会运行命令,同时CSH_NULL_GLOB会返回错误。
NULL_GLOB
CSH_NULL_GLOB