I have a bash script that uses ssh and requires 1 positional argument. If I type the name partially, the bash-completion completes it and the script works. The issue is that I can't find it anywhere to look into it. I checked for it in all the directories of $PATH
, tried locate
and find
(without sudo so permission denied on /proc
) and I can't find it. I am wondering how bash completion is completing it. It's not in the home directory for sure. I am using Debian 11
which
?which commandname
doesn't help, trytype commandname
which
andwhereis
doesn't work.type
worked and the output says that it's a function. How can I edit that function?$ bash --debugger
and then$ declare -F commandname
.bash --debugger
gives no output but then runningdeclare -F commandname
did give the location of the function. It's in a custom .bash file which is read by.bashrc
. What'sbash --debugger
is doing here?