0

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

7
  • Did you try which?
    – Kefka
    Jun 22 at 13:34
  • 1
    it might not be a bash script but a shell function, so if which commandname doesn't help, try type commandname Jun 22 at 13:44
  • which and whereis doesn't work. type worked and the output says that it's a function. How can I edit that function?
    – Cruise5
    Jun 22 at 13:54
  • Try with: $ bash --debugger and then $ declare -F commandname. Jun 22 at 14:04
  • @schrodingerscatcuriosity running bash --debugger gives no output but then running declare -F commandname did give the location of the function. It's in a custom .bash file which is read by .bashrc. What's bash --debugger is doing here?
    – Cruise5
    Jun 22 at 14:27

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.