Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Completing insteadOfs for __git_any_repositories



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