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

Re: completion of filenames



On 2019-12-13 8:24 a.m., Peter Stephenson wrote:
Well, you're welcome to do that, of course, but I can't help thinking
you're shooting yourself in the foot.
I'll be quite prepared to abandon the idea if I get into trouble. Learn by doing tho.

The system is designed to work
out of the box; while you can make it do other things, obviously that
implies you need some understanding of how it works before you can build
it up yourself.  Your questions don't tend to suggest that's currently
the case.  Background reading (such as Oliver's chapters in From Bash To
Z Shell) and studying the documentation and the shell code itself are
the first steps to getting there.
The completion documentation is overwhelming.  It would be a year of study to understand it.  Without hints I have no chance.  If there is some tractable way of getting what I'd like, that's great, if not, that's ok.  Bart and Dana recently showed me how to complete local files even if the command finds no acceptable matches,
so what I'm asking for is sorta an expansion of that idea.

If you're trying to get completion for suffix aliases going, the normal
way to do this would be to assure yourself they work with a vanilla set
up,

Yeah, that would be 90% of it, and since it should work, a forensic might be the way to go, but for now  I'm still pursuing the possibility that any filename completion from the
beginning of a line might be doable.  If not then just as you say.

then see what configuration of yours is stopping it working.  In my
experience, this is generally more effective that telling people that
what you've currently got doesn't work.
Well, I'd not say 'doesn't work' (except for suffix aliases) , it seems to be designed to complete after a command.  If it can be tweaked to not require a command that's great. But I must say, given what *can* be done, which is astonishing, asking for plain vanilla completion without reference to a command would not seem like asking for the moon. I'd expect it to  be simply a matter of skipping over the 'find command' part of completion.
Or not.  Anyway for now I don't even know where to look.





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