zsh-workers
 help / color / mirror / code / Atom feed
* Completing insteadOfs for __git_any_repositories
@ 2012-04-19  8:17 Nikolai Weibull
  0 siblings, 0 replies; only message in thread
From: Nikolai Weibull @ 2012-04-19  8:17 UTC (permalink / raw)
  To: Zsh Workers

Hi!

I figured that it’d be nice if insteadOfs were completed for
__git_any_repositories:

(( $+functions[__git_instead_ofs] )) ||
__git_instead_ofs () {
  declare -a instead_ofs

  instead_ofs=(${${(0)"$(_call_program instead-ofs "git config -z
--get-regexp '^url\\..+\\.insteadof$'")"}//#%(#b)url.(*).insteadof$'\n'(*)/${match[2]//:/\\:}:${match[1]//:/\\:}})

  _describe -t instead-ofs 'instead of' instead_ofs -S '' $*
}

The problem is what to do once the insteadOf has been completed and
the user tries to complete after the insteadOf.  The simplest desired
result is to simply disable completion after it, but I can’t think of
how to do that off the top of my head.

Any suggestions?


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-04-19  8:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-19  8:17 Completing insteadOfs for __git_any_repositories Nikolai Weibull

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