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

Re: complete based on contents of another folder or folders?



On Sun, Aug 7, 2011 at 4:23 PM, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:

> } - no filenames do NOT have spaces in them
>
> I'm not sure what that means.  "All filenames DO have spaces" perhaps?
> In any case this shouldn't matter, completion will take care of doing
> quoting.

(It means I'm a moron.)

I conflated "no filenames have spaces" and "filenames do NOT have
spaces" and created a double negative which said exactly the opposite
of what I was trying to say.



> } - I only want the part of the filename up until the first literal "."
> } (and each file has at least one ".")
>
> At this point you've gone beyond what can be done with configurations
> of the existing completions, because omitting part of the matching
> name (as opposed to the leading path) is a special condition that's
> not generally passed through all the layers of helper functions.
>
> (If you wanted to remove specific substrings like ".jpg" it could be
> done with a matcher-list zstyle, but I don't believe there's any way
> to configure a matcher-list for "anything following a dot".)

Actually the files do all have the same "suffix" but in this instance
I can just rename the files by removing everything after the dot,
which was superfluous information anyway.

Thanks again.

TjL



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