I cannot figure out how to find the file where a bash function is defined (__git_ps1
in my case).
I experimented with declare
, type
, which
, but nothing tells me the source file. I read somewhere that declare
can print the file name and the line number, but it was not explained how. The help
page for declare
does not say it either.
How can I get this information?
$PATH
, thentype
won't work. You might want to try just usingfind
orlocate
.locate
will be much faster, since it uses a pre-existing database, but it won't work if the command was installed just recently. – user628544 Nov 12 at 18:06