Bart Schaefer wrote on Mon, Jun 02, 2014 at 20:46:03 -0700: > On Jun 2, 6:23pm, Daniel Shahaf wrote: > } > } Would it make sense to have (Y) take a numeric argument specifying the > } maximal number of files to match? e.g., *(NY5) would expand to between > } 0 and 5 filenames (but never more than 5). > > My concern is that people are going to expect the (o)/(O) qualifiers to > take effect before (Y) does, and will be confused about the "skipped" > files when it takes effect after. If (Y) can't return more than one > result, there's nothing to sort. The expectations about sorting are just as much of a problem with (Y) as they would be with (Y42): in both cases there might be "skipped" files. For example, in the source dir, *(Y/on) [or *(Y1/on)] might result in "Etc" even though "Doc" exists. Let's clarify that in the documentation of (Y). > However, I can't come up with any other objection. Two patches attached. The first patch implements (Y42) and adds completion and the above-mentioned docs clarification. (The two latter parts should be useful even if we don't add an argument to (Y).) The second patch isn't strictly required, but it cleans up the return type changes that are no longer needed after the first patch. FWIW, I'm intentionally making (Y) without argument an error; we can settle on its semantics later after (Y42) has seen some "in the field" use. The spelling (Y1) can be used instead. Cheers, Daniel