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

Re: cd - not expanding to dirs



On Nov 19, 10:05pm, zzapper wrote:
}
} But how should I have known that "cd -" depended on [compinit] ?

Osmosis?

More seriously, attempting to answer this question (and similar ones about
how to introduce novice users to the zsh feature set) is what led to the
creation of the zsh/newuser module and zsh-newuser-install function.

Ideally the first time you ran the shell you should have been prompted by
the newuser subsystem to initialize completion and various other setup.
If you aren't the first root user, or the OS packager includes a default
setup for root, then you miss out on this.

} How should I have approached searching the doc? 

In this case it's less how you should have approached searching it than
how you should have approached browsing it.

The third section of the documentation is entitled "Roadmap".  There is
a subsection therein called "Completion".  The second paragraph of that
section says:

  Zsh has two completion systems, an old, so called compctl completion
  (named after the builtin command that serves as its complete and only
  user interface), and a new one, referred to as compsys, organized as
  library of builtin and user-defined functions.  The two systems differ
  in their interface for specifying the completion behavior.  The new
  system is more customizable and is supplied with completions for many
  commonly used commands; it is therefore to be preferred.

  The completion system must be enabled explicitly when the shell starts.
  For more information see Completion System.

Those last two words are a link to the twentieth (!) section, which
rambles a bit about contexts and styles and dispatchers, and then moves
on with a section "Initialization" which explains compinit.



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