In git-bash (on Windows 7) I've installed a git helper script in ~/bin/git-script but when I run it I receive the following:

$ git script
git: 'script' is not a git command. See 'git --help'.

Did you mean this?
    script

This is weird because it obviously has knowledge of the script command that I installed. Running it as git-script works fine. Any ideas?

link|improve this question

67% accept rate
feedback

1 Answer

This has been a year since it was asked, however, I suspect what was wrong was that the '~/bin' directory was not on the $PATH.

The fully-expanded path (such as /c/Users/Administrator/bin in the case of msysgit, rather than ~/bin), must be in the PATH in order for them to work like that.

link|improve this answer
I don't think it was directly because of $PATH because I can run it all by itself as git-script and that works fine. – Bostonvaulter Apr 10 at 3:52
@Bostonvaulter: Well, I had that happening in Mac OS X, the directory was in the $PATH, and I could run it fine explicitly, but not via 'git script', turns out that the '~' I had used was not getting expanded, I had to expand it explicitly... – Arafangion Apr 11 at 7:49
oh, so you're saying that the ~ was being expanded by Bash but not by the git runner. That makes sense, I'll look into that. – Bostonvaulter Apr 12 at 0:20
@Bostonvaulter: Yep. – Arafangion Apr 12 at 1:42
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.