Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: The (e) glob qualifier and NO_NOMATCH

On Jun 22,  4:12pm, Oliver Kiddle wrote:
} Given that you can do something like:
}   for remote in $(forcemount '/net/r*'); do ...
} is your point purely that you think the syntax would be nice or are you
} thinking in terms of being able to pass the function down through the
} completion system so that it is only run if and when _path_files expands
} the pattern?

I was just using the completion system as an example of a case where a
nonexistent file is forced to come into existence so it can later be
globbed.  I'm not otherwise thinking in terms of completion at all.

Rather I'm thinking in terms of the "search upwards but stop at the
first file" glob request posted to zsh-users earlier this week.  I
wanted to say

  up() { reply=( (../)#$~REPLY(Odon) ); reply=( $reply[1] ) }

  less adr*(+up)

but "up" is never called because adr* has no matches in the current dir.
} In many respects using (e) and modifying $reply makes it more of a
} modifier than a qualifier. Perhaps we should have had a :e modifier.

We already do, it just doesn't mean "eval" ....

Messages sorted by: Reverse Date, Date, Thread, Author