Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Completing insteadOfs for __git_any_repositories
- X-seq: zsh-workers 30420
- From: Nikolai Weibull <now@xxxxxxxx>
- To: Zsh Workers <zsh-workers@xxxxxxx>
- Subject: Completing insteadOfs for __git_any_repositories
- Date: Thu, 19 Apr 2012 10:17:18 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type:content-transfer-encoding; bh=R36LoRpcu2hFMEwP2asujoaqombOhdfn9t8MSmi5egM=; b=sUeAaTHRY+ROqtld/DIo9dL+Qs+JpDIQ+lmSCCSBv/Gh6jfNC7Gf5bki2jJMGo5a+z dvtT8JX/0VvomuKkodG1j9BEmmDLkI9vw8uR8SgyE2+D+Oo+OlylJWzlTVHbcgjybBTp gd7ZJSgIVLzFOoq6hHuwIBssQ6/medN5t8Tnmg3cpytJPdQxdrjHfxs6OFQwIO/gxOZd i+PaSuA1I8chgQ00muE/VEpvY1bmTcVQD/H7K9XmMtWdpNV33sUbrv69sUjcOyMOdKNq A5+YkyRajLQu8Gb68lsV64KwP39pBDHhfnyAMFNimEYlaT5YMrUCHNFOWFHez1O6qh/M 1j8A==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- Sender: nikolai.weibull@xxxxxxxxx
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?
Messages sorted by:
Reverse Date,
Date,
Thread,
Author