Linux shell "auto complete"?

a year ago by Fuck u/spez to c/linux4noobs

I'm moving away from Windows (yay!) and need to bring a few features with me. Microsoft added this auto complete feature to PowerShell recently and I need something similar:

I found this package which is helpful, but it requires you to hit tab before you get a list of suggested commands: https://wiki.debian.org/Add%20Bash%20Completion

Do I need a different shell entirely? I'm using bash on Debian now.

BastingChemina 16 points a year ago

Use fish as your command line shell, it's doing exactly that and way more.

It's so intuitive and useful that I forgot that it was not part of the standard shell.

https://fishshell.com/assets/img/screenshots/autosuggestion.webp

path: 0 18596677, hotness: undefined, score: 16, children: 2
splendoruranium 4 points a year ago

It... it never occurred to me to use a different shell. Hm. Maybe I should.

path: 0 18596677 18598446, hotness: undefined, score: 4, children: 0
Fuck_u_spez_ 2 points a year ago

Installed. Thanks!

path: 0 18596677 18741279, hotness: undefined, score: 2, children: 0
BenPranklin 11 points a year ago

Definitely doable with zsh plugins. There are some options for bash like this but ive never used them

path: 0 18594018, hotness: undefined, score: 11, children: 0
Petter1 11 points a year ago

I recommend starship in combination with fish

path: 0 18594679, hotness: undefined, score: 11, children: 0
Botzo 9 points a year ago

I've not encountered this for bash.

The usual recommendation is to use Ctrl+r and do lookups when you need them.

Auto-suggestions are built into the fish shell and easily added to zsh. I haven't explored beyond those in a long time.

I hesitate to recommend changing shells for a newbie, but plenty of distros are using alternatives out of the box (usually zsh).

The typical journey for a newbie power user is a switch to zsh and an installation of oh-my-zsh, and then you can install zsh-autosuggestions as a plugin.

I wouldn't recommend fish shell to you yet, but only because you're new enough on your journey to be copy-pasting and fish isn't posix compliant which could throw you off occasionally. (This will probably bait some fish fanatics).

path: 0 18594778, hotness: undefined, score: 9, children: 1
Ephera 6 points a year ago

As a fish fanatic, I agree completely.

path: 0 18594778 18595444, hotness: undefined, score: 6, children: 0
taaz 8 points a year ago

Tab completion is the thing on linux, you can probably get something similar with zsh and it's plugins, maybe with fish too.

path: 0 18593968, hotness: undefined, score: 8, children: 1
Ephera 9 points a year ago

Fish has it built-in.

It is, after all, a command line shell for the 90s.

path: 0 18593968 18595585, hotness: undefined, score: 9, children: 0
A_norny_mousse 5 points a year ago

Are you sure you cannot get used to the double-Tab?

It has everything you ask for and more; except for the visual in your screenshot.

If the answer really is No, you'll have to move away from bash for interactive shells.

path: 0 18595116, hotness: undefined, score: 5, children: 0
ephos 2 points a year ago

You could be a mad lad like me and run PowerShell on Linux and as long as you have the PSReadline module you'll get this autocomplete. As others mentioned fish is also a great shell and I think with oh-my-bash and oh-my-zsh bash and zsh can do this as well.

I don't know if it has it but Nushell might also have something similar and feel a bit more natural coming from pwsh.

tldr; You can stick with pwsh or have tons of alternative options!

path: 0 18598782, hotness: undefined, score: 2, children: 0
magic_lobster_party 2 points a year ago

Is Ctrl+R good enough for you? I use it all the time.

path: 0 18595669, hotness: undefined, score: 2, children: 1
FizzyOrange 1 point a year ago

Stock ctrl-r is kinda shit but you can make it a lot better with McFly or Atuin.

path: 0 18595669 18598299, hotness: undefined, score: 1, children: 0
linux4noobs
linux4noobs

@programming.dev

login for more options
4505
308
83

linux4noobs


Noob Friendly, Expert Enabling

Whether you're a seasoned pro or the noobiest of noobs, you've found the right place for Linux support and information. With a dedication to supporting free and open source software, this community aims to ensure Linux fits your needs and works for you. From troubleshooting to tutorials, practical tips, news and more, all aspects of Linux are warmly welcomed. Join a community of like-minded enthusiasts and professionals driving Linux's ongoing evolution.


Seeking Support?
  • Mention your Linux distro and relevant system details.
  • Describe what you've tried so far.
  • Share your solution even if you found it yourself.
  • Do not delete your post. This allows other people to see possible solutions if they have a similar problem.
  • Properly format any scripts, code, logs, or error messages.
  • Be mindful to omit any sensitive information such as usernames, passwords, IP addresses, etc.

Community Rules

  • Keep discussions respectful and amiable. This community is a space where individuals may freely inquire, exchange thoughts, express viewpoints, and extend help without encountering belittlement. We were all a noob at one point. Differing opinions and ideas is a normal part of discourse, but it must remain civil. Offenders will be warned and/or removed.
  • Posts must be Linux oriented
  • Spam or affiliate links will not be tolerated.

go to feed...