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

Re: Completion or.. expansion..



On Jul 25,  9:23am, Andrew Markebo wrote:
} Subject: Re: Completion or.. expansion..
}
} Hmm ok, then.. time to reformulate the question.. I want to configure
} what TAB does :-) I assume that is Completion then. 

Hmm, ok, then, time to reformulate the answer.

bindkey '\t' expand-or-complete	# Does expansion first, or else completion
bindkey '\t' complete-word	# Does completion only

The default binding if you don't re-bindkey it is expand-or-complete.

If you put the word "_expand" anywhere in your completer zstyle, though,
the `compinit' function (a call to which is added to your ~/.zshrc by
`compinstall') will automatically rebind '\t' from expand-or-complete
to complete-word.

So the upshot probably is that you don't need to worry about it at all.
Just leave it alone, run compinstall, and the right things will happen.

} | > setopt glob bareglobqual nullglob rcexpandparam extendedglob unset
} | >   unsetopt markdirs globsubst shwordsplit shglob ksharrays cshnullglob
} | >   unsetopt allexport
} | > 
} | > Should I use these, or do something with completion, compinstall?
} | 
} | Where did you find those three (un)setopt commands, and why do you think
} | you need them?
} 
} Just an example from my side, sort of "is it these I should poke
} on?" (from the zsh users guide) or are they replaced by 
}         "zstyle ':completion:*' completer _list ..."
} or do they work together? If I have got stuff right, the zstyle
} replaces them?

None of those setopts has anything whatsoever to do with completion, with
the possible exception of `markdirs'.  So no, the zstyles don't replace
*those* options, but there *are* some *other* options that zstyles either
replace or augment.

That's why I ask, "Where did you find *those* commands, and why ...?"

} So basically.. remove all my options for completion, run compinstall
} and live happily for the rest of the time :-)?

More likely, it's leave all your options exactly as they are, run
compinstall, and live happily.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   



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