tags:

views:

27

answers:

1

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?

+3  A: 

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.

R Samuel Klatchko