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

Re: completion of filenames



On 2019-12-10 8:59 a.m., Ray Andrews wrote:
On 2019-12-10 8:30 a.m., Peter Stephenson wrote:

Suffix aliases are already handled.  So if it's a file in the current directory, you should find typing ./<tab> completes files with a suffix alias defined.

pws

Doesn't work.  This could be something I've botched up myself. Here's what I think is relevant:

If no one has any ideas about this, I'm tempted to try to tinker with it myself.  Where is 'expand-or-complete' defined?  The string shows up dozens of times but I can't find the widget definition. Or, isn't there a file somewhere that defines the proper completions for a given command?  Yeah, I saw it once but can't remember where it is.  Anyway, supposing that I hid that file?  If it can't do any of those match-ups between a  command and it's valid completions, might it not just give up and complete the filenames anyway?  Or, just make a sort of 'universal' command or nul command that always completes on filenames.  Dunno,  but it seems that simply bypassing the initial search for a command should be doable.  What I do now is type a one letter command that's a function equivalent to 'edit', then however many letters to start the filename, then hit TAB to complete on filenames, then go to the beginning of the line, erase the single letter command, and voila, I have my completed filename. Perhaps that operation can be made into a widget?  I found a few custom widgets on the web but none that do any such thing, but I'd bet it can be done.  The customizations that are on offer are mind boggling, but in my case it's the simple thing that's hard to do.






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