__git_ps1 is a command I can run in the BASH shell and it runs no matter which directory it runs from. How can I tell where this batch file is sourced from? I checked all my $PATH folders and it isn’t in any of those.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If the command is actually a stand-alone script in your path, you can use the type command to locate it:
type __git_ps1However, it could be a function or an alias, in which case, the output of the type command won’t be terribly helpful. (Apart from at least letting you know that it’s a function or an alias.)
[Edit]
Just realized this is from git completion, it’s (probably?) defined in /etc/bash_completion.d/git.