From: Timothy J Luoma <luomat+zsh+users@luomat.peak.org>
To: zsh-users@math.gatech.edu
Subject: completion help?
Date: Sun, 16 Nov 97 20:11:53 -0500 [thread overview]
Message-ID: <199711170111.UAA01143@luomat.peak.org> (raw)
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
next reply other threads:[~1997-11-17 1:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1997-11-17 1:11 Timothy J Luoma [this message]
1997-11-17 2:48 ` Bart Schaefer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=199711170111.UAA01143@luomat.peak.org \
--to=luomat+zsh+users@luomat.peak.org \
--cc=zsh-users@math.gatech.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).