Bash enhanced tab completion?

So, I'm normally a Powershell Guy, but I'm taking courses in cyber security, and dual booting to debian now. I've always had a minimal competence sort of thing with a nix' shell, where I can get most of what I need done, but I'm not building any scripts or doing anything advanced with multiple lines of code.

What basically allowed me to learn Powershell, so fast and easily, was the tab completion included in later versions. You can actually tab through all parameters, variables, functions, commands, etc. So if I wanted to see all the parameters for ls, I could type "ls -(tab)a (tab again) l (tab again) h. For example. Also it would complete methods or properties for you like ls | where-object {$.s (tab) $.status -e (tab again) $_.status -eq 'running'}

So is there anything like this for BASH? Like any addons that would enhance the auto-complete / tab complete function? I think I might have heard that emacs could do this?

I think what you are looking for is bash-completion however it might not be as full featured as what powershell has (I don't know anything about powershell). I'm running debian but i'm not sure if it comes installed out of the box you can check if you have it installed with

apt show bash-completion

If you don't have it installed assuming you have sudo access you can run

sudo apt install bash-completion

If your user isn't in the sudoers file you can login as root with

su

and just do apt install bash-completion

1 Like

Not sure about functionality exactly like that but you could try ZSH. Its basically bash but with some better autocomplete tab tools.

1 Like

Thanks guys, I already have bash-completion installed, but I found out that I can list most of the commands with a double tab after -- , so it's not all bad. Just some commands I have to look through the man, which is rather extensive. Just a convenience feature

I'm sure it's possible to make bash more extensible by enhancing bash-completion? That would be a pretty neat project, which would get a lot of support, I'm sure.

I'm not sure... I know there is oh-my-zsh for Z Shell so there probably would be stuff like that for bash.

ZSH is not really an option. I'm on KALI right now and my courses are focused on BASH. I feel like it would just confuse me to no end, as I'd eventually switch back to BASH and have to re-learn it again anyway.

ZSH is BASH with some extra tweaks. All BASH commands are ZSH commands.