zsh-workers
 help / color / mirror / code / Atom feed
* compctl -v
@ 1999-03-10 20:15 Bernd Eggink
  1999-03-11  6:32 ` Bart Schaefer
  0 siblings, 1 reply; 3+ messages in thread
From: Bernd Eggink @ 1999-03-10 20:15 UTC (permalink / raw)
  To: Zsh-workers

Never having paid much attention to the discussion about completion (my
main interest being zsh as a programming language) I just tried it
anyway, and run into trouble with completion of shell parameters. After

	compctl -D -v

these commands are nicely completed:

	vared xyz<TAB>
	print $xyz<TAB>

But in the completion list of

	ls xyz<TAB>

all shell parameters starting with 'xyz' also show up, which IMHO is
nonsense. Any way to prevent this, and get parameter names completed
only if preceded by '$' or 'vared'?

Regards,
	Bernd

-- 
Bernd Eggink
Regionales Rechenzentrum der Uni Hamburg
eggink@uni-hamburg.de
http://www.rrz.uni-hamburg.de/eggink/BEggink.html


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

* Re: compctl -v
  1999-03-10 20:15 compctl -v Bernd Eggink
@ 1999-03-11  6:32 ` Bart Schaefer
  0 siblings, 0 replies; 3+ messages in thread
From: Bart Schaefer @ 1999-03-11  6:32 UTC (permalink / raw)
  To: Bernd Eggink; +Cc: Zsh-workers

Bernd Eggink writes:
 > 	compctl -D -v

This means that all default completions should use parameter names and
only parameter names, which is probably not what you intended.

 > these commands are nicely completed:
 > 
 > 	vared xyz<TAB>
 > 	print $xyz<TAB>

Completion following a $ is a special case and doesn't require compctl
to activate it.

 > 	ls xyz<TAB>
 > 
 > all shell parameters starting with 'xyz' also show up, which IMHO is
 > nonsense. Any way to prevent this, and get parameter names completed
 > only if preceded by '$' or 'vared'?

Yes; you want to get rid of that compctl -D, and instead use

     compctl -v vared

A minimal set of sensible compctls using only built-in completions is:

compctl -B builtin
compctl -m command
compctl -v declare integer local readonly read
compctl -aBFw disable
compctl -daBFw enable
compctl -c exec sched whence where -
compctl -F functions unfunction
compctl -Nv getln
compctl -a unalias
compctl -cn unhash
compctl -k signals trap
# These last few are enabled by default in 3.0, but not in 3.1.2 and later
compctl -b bindkey
compctl -v export typeset unset vared
compctl -o setopt unsetopt
compctl -c which

The argument for leaving out all default compctls from 3.1.2+, last time I
heard it, is that the above set isn't "good enough" by comparison to the
collection in Misc/compctl-examples to be worth having.  I've been saying
for at least a year now that I think that's a silly reason to have zsh
out-of-the-box default to completing nothing but file names, but I guess
I'm beating a dead horse.


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

* Re: compctl -v
@ 1999-03-11  8:25 Sven Wischnowsky
  0 siblings, 0 replies; 3+ messages in thread
From: Sven Wischnowsky @ 1999-03-11  8:25 UTC (permalink / raw)
  To: zsh-workers


Bart Schaefer wrote:

> The argument for leaving out all default compctls from 3.1.2+, last time I
> heard it, is that the above set isn't "good enough" by comparison to the
> collection in Misc/compctl-examples to be worth having.  I've been saying
> for at least a year now that I think that's a silly reason to have zsh
> out-of-the-box default to completing nothing but file names, but I guess
> I'm beating a dead horse.

Ah, having been away at the time, I always wondered...

I'm tempted to suggest a simple patch with just an array of strings
and making `boot_compctl()' simply call `bin_compctl()', hm.

Bye
 Sven


--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


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

end of thread, other threads:[~1999-03-11  8:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-03-10 20:15 compctl -v Bernd Eggink
1999-03-11  6:32 ` Bart Schaefer
1999-03-11  8:25 Sven Wischnowsky

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).