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
    Commented Jun 22, 2022 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 Commented Jun 22, 2022 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
    Commented Jun 22, 2022 at 13:54
  • Try with: $ bash --debugger and then $ declare -F commandname. Commented Jun 22, 2022 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
    Commented Jun 22, 2022 at 14:27

0

You must log in to answer this question.

Browse other questions tagged .