zsh completion rocks

2007-09-17 21:40:53 UTC

Specifically, enable and configure zshcompsys. Here’s what this will get you (6 seconds; 144 K; requires any version of QuickTime):

UPDATE 2007-09-18 11:54 PDT: More info in the comments.

5 Responses to “zsh completion rocks”

  1. CBowns Says:

    I can’t get that working: is there some place you could post your .zsh* files? Or do you know which exact completion option gives you the shorthand directory name completion?

  2. Peter Hosey Says:

    CBowns: Sure. Here’s my .zshcomp file. bunzip2 it and rename it to ~/.zshcomp, then add a line to your .zshenv that says . $HOME/.zshcomp.

  3. CBowns Says:

    This is weird. I had basic autocomplete and auto-cd working in my .zshrc by running:

    autoload -U compinit
    setopt auto_cd

    but when I add compinit, I lose all autocompletion: ls followed by tab doesn’t complete anything at all. Time to debug my init files.

    Thanks for the completion file.

  4. Peter Hosey Says:

    Ah, sorry—I missed a few other lines that you need in your .zshenv:

    setopt complete_in_word NO_LIST_BEEP
    bindkey "^I" expand-or-complete-prefix
    bindkey "^X^I" expand-or-complete
  5. CBowns Says:

    Ah, I got it working. Turns out, when changing the completion dictionary like this, you really ought to delete .zcompdump to start things fresh. Everything’s working now, and your completion modifications are excellent. Thanks again for the source files!

Leave a Reply

Do not delete the second sentence.