开发者

zsh make **/*.cpp **/*.cxx **/*.hpp not result in error

I have "v" aliased to "vim **/*.cpp **/*.hpp **/*.cxx"

Problem is, if I'm in a directory without any *.cxx files, zsh treats this as an error. Is there anyway 开发者_开发问答to tell zsh to create the absence of **/*.cxx files as "" instead of an error?


It sounds like you want:

set -o NULL_GLOB

Another variation that may be of interest is:

set -o CSH_NULL_GLOB

They work slightly different when all the patterns fail to expand. When at least one pattern successfully expands, the two are the same. But if none of the patterns expand, NULL_GLOB will still run the command while CSH_NULL_GLOB will return an error.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜