-
Notifications
You must be signed in to change notification settings - Fork 4.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add a way to define git
function in git module
#589
Comments
Ok, sorry for the dupe. rather than aliasing git directly to hub, we may alias it to a script, and this script would determine (if possible) if we are in prompt generation. if yes, forward command to git, and if no, run hub maybe this is stupid or not feasible, just wondering… |
additionnaly, this script could inspect |
my zsh skills are very low, but something like if [[ ${funcstack[(i)_git]} -le ${#funcstack} ]] ; then
command git "$@"
elif [[ ${funcstack[(i)git-info]} -le ${#funcstack} ]] ; then
command git "$@"
else
hub "$@"
fi |
That won't work. _git is a the completion function, a giant file that calls |
Not sure I was clear. The idea, here, is not to change |
There are way too many functions of which to keep track. It's not reliable. |
In some cases, it can be useful to choose what script is designed by
git
, especially ingit-info
.For example, I am using defunkt/hub which improves git features, and aliased it to
git
for commodity reasons. Buthub
is much slower thangit
, which is not perceptible in everyday use, but really visible in prompt module.I'd love git module could call
command git
instead ofgit
, but I'm not sure it has to be hard coded, then I suggest adding it as a configuration of git module.The text was updated successfully, but these errors were encountered: