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

Re: Where do these completions come from?



On Fri, Oct 15, 2021 at 8:59 PM Dominik Vogt <dominik.vogt@xxxxxx> wrote:
>
> On Fri, Oct 15, 2021 at 08:46:27PM +0200, Roman Perepelitsa wrote:
> > On Fri, Oct 15, 2021 at 8:43 PM Dominik Vogt <dominik.vogt@xxxxxx> wrote:
> > >
> > > I accidentally hit "d<tab>" and a list of things got displayed
> > > (menu completion), including
> > >
> > >   dis_aliases
> > >   dis_builtins
> > >   dis_functions
> > >   dis_functions_source
> > >   dis_galiases
> > >   dis_patchars
> >
> > These are parameters. They come from the zsh/parameter module. See
> > `man zshmodules`.
>
> Okay, understood.  But why is it useful to expand hashtable names
> in command position?

I don't think it's useful. You can disable it:

  zstyle ':completion:*:complete:-command-:*:*' tag-order \
      'commands functions' -

I don't know why the default is what it is. I don't expect zsh
defaults to make sense. Why is interactive_comments disabled in
interactive shells? Why does prompt show hostname but not the current
directory? It's all for historical reasons, I guess. I do appreciate
that my shell doesn't break when I upgrade to a newer version of zsh,
so backward compatibility is a valid justification for all this.

Roman.




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