zsh-users
 help / color / mirror / code / Atom feed
* Can this be done with compctl?
@ 2003-10-18 16:17 DervishD
  2003-10-21 18:12 ` Bart Schaefer
  2003-10-28 11:36 ` Oliver Kiddle
  0 siblings, 2 replies; 7+ messages in thread
From: DervishD @ 2003-10-18 16:17 UTC (permalink / raw)
  To: Zsh Users

    Hi all :))

    I wanted to simulate the bash behaviour of completing command
names if you hit TAB on an empty prompt, and my first try was using
compsys (I'll use compsys for naming the new completion system). I
don't use the provided set of functions (_main_complete based), so I
do something like:

    completer () {
        compadd -a commands -k functions builtins aliases galiases
    }
    zle -C complete expand-or-complete completer
    bindkey "^O" complete

    This is just a test for showing more or less what I want:
obviously a better and more ellaborated solution should be written,
but this is not the point. The question is that I would like to do
something similar with compctl. I've tried, with no success, things
like:

    compctl -T -x 'p[0]' -c - --
    compctl -T -x 'm[0]' -c - --

    or similar commands using empty command names instead of '-T'
(which, BTW, should not be used for that...). It seems that compctl
don't even try to complete if there is not a word in the prompt :??

    Anyone can help?

    Although as I told in the past, default completion (no compsys,
no compctl) fulfills 98% of my needs, and compctl will do for a
couple of commands I want specially completed, I must confess that
compsys is more comfortable for defining some completions, even
without _arguments or things like that.

    Thanks a lot in advance.

    Raúl Núñez de Arenas Coronado

-- 
Linux Registered User 88736
http://www.pleyades.net & http://raul.pleyades.net/


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2003-10-28 15:54 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-18 16:17 Can this be done with compctl? DervishD
2003-10-21 18:12 ` Bart Schaefer
2003-10-21 19:24   ` DervishD
2003-10-28 11:36 ` Oliver Kiddle
2003-10-28 15:41   ` Bart Schaefer
2003-10-28 15:44     ` DervishD
2003-10-28 15:42   ` DervishD

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).