zsh-users
 help / color / mirror / code / Atom feed
* complete based on contents of another folder or folders?
@ 2011-08-07 10:21 TJ Luoma
  2011-08-07 17:40 ` Peter Stephenson
  2011-08-07 20:23 ` Bart Schaefer
  0 siblings, 2 replies; 5+ messages in thread
From: TJ Luoma @ 2011-08-07 10:21 UTC (permalink / raw)
  To: Zsh Users

I know almost nothing about Zsh's completion feature, other than it's
cool and I wish I took better advantage of it.

Here's are some of first things I'd like to do. I'm hoping that
someone might be able to explain this in a way that will allow me to
replicate this in other scenarios.

1)
"open -a [tab]" should offer "any file found in

/Applications/
/Applications/Microsoft Office 2011/
/Applications/Utilities/
/Applications/iWork '09/

which ends with '.app' and should not show the dirname (and doesn't
need to show the '.app' suffix, but that's not crucial).

(I assume that once completion is setup, 'open -a B[tab]' will only
offer apps which start with the letter "B")

I have to assume that someone has already invented this particular
'wheel' already.

2) Similarly

        get_app [tab]

should offer completions based on files found in
~/Dropbox/get_app/rcs/ with the following stipulations:

- I only want the part of the filename up until the first literal "."
(and each file has at least one ".")
- no filenames do NOT have spaces in them
- subfolders may exist, but should be ignored (same is true for files
which begin with '.')

Thanks!

TjL

ps - Is there an "intro-to-zsh-completion" (aka "completion for
dummies" ;-) somewhere?


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

end of thread, other threads:[~2011-08-08 14:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-07 10:21 complete based on contents of another folder or folders? TJ Luoma
2011-08-07 17:40 ` Peter Stephenson
2011-08-07 20:23 ` Bart Schaefer
2011-08-08 12:54   ` TJ Luoma
2011-08-08 14:34   ` TJ Luoma

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