zsh-workers
 help / color / mirror / code / Atom feed
From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: Felix Rosencrantz <f_rosencrantz@yahoo.com>,
	zsh-workers <zsh-workers@sunsite.auc.dk>
Subject: Re: Completing parameter names that have yet to be set.
Date: Mon, 14 Aug 2000 07:15:34 +0000	[thread overview]
Message-ID: <1000814071534.ZM18590@candle.brasslantern.com> (raw)
In-Reply-To: <20000814055143.26862.qmail@web1104.mail.yahoo.com>

On Aug 13, 10:51pm, Felix Rosencrantz wrote:
} Subject: Re: Completing parameter names that have yet to be set.
}
} For example, in my source code tree I might want to look at ".[ch]"
} files first, but in logs directory I want to look ".{log,out}" files
} first.  I can use tags, but I still have to list tags for ".[ch]" and
} for the ".{logs,out}" files. And if both types of directories contain
} files that match both tags, there will be at least one directory where I
} always get the incorrect completion the first time.
}
} [...]
}
} It seems that the ability to configure styles based on additional
} information not found in the context requires the ability to treat a
} group of styles as a single whole, and quickly set/unset a group of
} styles.  I vaguely remember something like this was talked about, but
} don't remember what was decided.

This is what both `zstyle -e' and the `func()' value for the tag-order
style are supposed to accomplish, I think.  In fact, given `zstyle -e',
we could probably do away with `tag-order func()'.

zstyle ':completion:*' file-patterns \
	'*.[ch]:c-sources' '*.(log|out):log-files' '%p:all-files'
zstyle -e ':completion::complete:*' tag-order \
	'if [[ -d $PREFIX/CVS ]]; then reply=(c-sources all-files);
	 else if [[ $PREFIX == */log ]]; then reply=(log-files all-files);
	 fi'

Or something like that, I didn't try it so I've probably got it cockeyed.
And of course you'd have to come up with a more sophisticated test for
$PREFIX or whatever, to tell what kind of directory is what.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   


  reply	other threads:[~2000-08-14  7:16 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-08-14  5:51 Felix Rosencrantz
2000-08-14  7:15 ` Bart Schaefer [this message]
  -- strict thread matches above, loose matches on Subject: below --
2000-09-06  7:41 Sven Wischnowsky
2000-09-06  7:00 Felix Rosencrantz
2000-08-14  8:03 Sven Wischnowsky
2000-08-14  8:01 Sven Wischnowsky
2000-08-11  7:54 Sven Wischnowsky
2000-08-11  6:30 Felix Rosencrantz

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=1000814071534.ZM18590@candle.brasslantern.com \
    --to=schaefer@candle.brasslantern.com \
    --cc=f_rosencrantz@yahoo.com \
    --cc=zsh-workers@sunsite.auc.dk \
    /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).