From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22576 invoked from network); 17 Nov 1997 01:22:10 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 17 Nov 1997 01:22:10 -0000 Received: (from list@localhost) by math.gatech.edu (8.8.5/8.8.5) id UAA24187; Sun, 16 Nov 1997 20:12:35 -0500 (EST) Resent-Date: Sun, 16 Nov 1997 20:11:41 -0500 (EST) Message-Id: <199711170111.UAA01143@luomat.peak.org> Content-Type: text/plain MIME-Version: 1.0 (NeXT Mail 4.1mach v148) X-Image-URL: http://www.peak.org/~luomat/next/luomat@peak.org.tiff X-Nextstep-Mailer: Mail 4.1mach (Enhance 2.0b6.5) From: Timothy J Luoma Date: Sun, 16 Nov 97 20:11:53 -0500 To: zsh-users@math.gatech.edu Subject: completion help? X-Image-URL-Disclaimer: hey, it's off my student ID, gimme a break ;-) Resent-Message-ID: <"SyuPP3.0.Fv5.CdvRq"@math> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/1142 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu I've never really understood completions functions. I have two commands "run" and "open -a" which I would like to be able to supply Application's names to. I can get the names of the applications using this: sed 's/.*\///g' ~/.AppInfo/LaunchBar/Setup|sed 's/\.app$//g' (~/.AppInfo/LaunchBar/Setup is an ASCII file, one app per line) How can I make a function that will allow me to do: run [tab] to cycle through the apps and run S[tab] to cycle through the apps which start with an 'S'? I tried this (adapted from something someone gave me for something else) allapps () { apppath=(`sed 's/.*\///g' ~/.AppInfo/LaunchBar/Setup \ | sed 's/\.app$//g'`) reply=$apppath; } compctl -K allapps 'S[-]' -- run but when I hit tab nothing happens.... Clues for the clueless? TjL