zsh-users
 help / color / mirror / code / Atom feed
* Helpful username completion
@ 1997-06-10 20:48 Wez Furlong
  1997-06-11  8:31 ` Vincent Lefevre
  0 siblings, 1 reply; 2+ messages in thread
From: Wez Furlong @ 1997-06-10 20:48 UTC (permalink / raw)
  To: zsh-users

Just a helpful bit of compctl for zsh users at sites with a large number
of user accounts.

At York we have 11000 users which means a LONG wait for zsh to hash all
of them if you accidentally hit TAB too early...

This compctl was written by a friend and is great:

	trusted=(auser anotheruser myfriend)
	compctl -C -c -x 'W[0,\~*/*]' -g '*(-*,-/)' - 's[~]' -k trusted -S '/'
	compctl -g '*(D,-/)' -x 'C[0,\~*/*]' -g '*(D,-/)' - 's[~]' -k\
		trusted -S '/' -- cd

[\ denotes line continuation at the end of the second compctl line]

The net result is that zsh will only complete the list of users in the
trusted array after a ~

[example: before]

% ~a
 [Press Tab]
 [Long Wait]
 Do you wish to see all 1000 possibilities?

[example2: after]

% ~a
 [Press Tab]
 auser	anotheruser

Much nicer :)

Hope some of you find it helpful; full credit goes to my friend Alan who
is also a student here at York.

TTFN



-- 
Wez - Electronics Undergraduate at the University of York
URL : http://www.twinklestar.demon.co.uk/

Insult Of The Day: Thou clouted swag-bellied flirt-gill!


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

* Re: Helpful username completion
  1997-06-10 20:48 Helpful username completion Wez Furlong
@ 1997-06-11  8:31 ` Vincent Lefevre
  0 siblings, 0 replies; 2+ messages in thread
From: Vincent Lefevre @ 1997-06-11  8:31 UTC (permalink / raw)
  To: zsh-users

On Tue, Jun 10, 1997 at 09:48:34PM +0100, Wez Furlong wrote:
> Just a helpful bit of compctl for zsh users at sites with a large number
> of user accounts.
> 
> At York we have 11000 users which means a LONG wait for zsh to hash all
> of them if you accidentally hit TAB too early...

I've noticed that this is a bit long here too. Can't zsh provide a
cache mechanism?

-- 
Vincent Lefevre, vlefevre@ens-lyon.fr | Acorn Risc PC, StrongARM @ 202MHz
http://www.ens-lyon.fr/~vlefevre      | 20+1MB RAM, Eagle M2, TV + Teletext
PhD in Computer Science, 1st year     | Apple CD-300, SyQuest 270MB (SCSI)
-----------------------------------------------------------------------------


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

end of thread, other threads:[~1997-06-11  8:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-06-10 20:48 Helpful username completion Wez Furlong
1997-06-11  8:31 ` Vincent Lefevre

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