These auto-completions are dependent on having the corresponding completions information installed and enabled. Which it is with most modern distros, but more bare-bones setups won’t have it.
I have two Linux VMs, one Fedora, the other Arch. I’m guessing tab autocompletes are built into those as well?
In case of Arch, for
bash, you have thebash-completionspackage, apart from which some program packages install their own bash completions.
Then there is alsozsh-completionsforzsh.I remember having to install them separately, but maybe you know some package group that did it for you.
Arch has the packages, but it won’t be installed by default.
oh yeah, arch is for nerds who wanna customize everything themselves. i’m new to arch so i forget sometimes
interesting, didn’t know that… Will try!
Finding out about “Ctrl-r” also was a gamechanger.
Next step is discovering atuin! https://atuin.sh/
dude holy shit that is AWESOME! i had something similar, but it was a custom function.
srch() { cat ~/.bash_history | grep -Ein “$@”}
Did you know that grep can take the name of the file(s) you want it to search as the final arguments?
For example:
grep -Ein "$@" ~/.bash_history
Anyone who is learning new stuff in this thread should really try fish, it makes using the command line so much nicer.
I started out with bash, then eventually realized that I was using zsh because I’m a macbro. I’m a little slow :(
To be fair, they only switched to zsh in 2019, so a lot of tutorials probably still assume bash
for a while, i was so clueless that i didn’t even know i was using a zsh terminal. i thought i was in bash because i watched linux tutorials on youtube
zsh is fine until you want to write a script and realise the difference in resources available online. Most people assume bash for shell scripting so that’s what you’ll need to use too.
Just tried it, working is indeed nicer after some nice fresh tuna and Sushi.
Fish is such a nice shell.
I wrote a collection of small apps for fish a few weeks ago. If anyone wants to check it out: https://github.com/matdombrock/angler.fish

go with elvish, it’s new, sleek, and it even has functions that return functions, which means my plan to weaponize the english language by turning every word in a lower case punctuation free sentence into a series of shell commands is almost complete, MUAHAHAHAHA
EDIT: For legal reasons, this comment is just a shitpost, and I don’t know how to code. I’m just a lazy vibe coder.
-h
ls -SlutYou called?
Incredibly stupid, but should work
My favorite kind of advice
I’d like something like on Cisco equipment.
Tab completes a command
? prints possible options with brief descriptions, filtered by starting letters if you already typed anything
if there is just one option left, you can just use it directly, so you can write shortened commands (similar to ip commands on Linux)Whenever someone says they don’t really like terminal because they don’t like to type or remember commands. This is what I think “they didn’t use auto complete”.
Auto complete works for file names and paths by default, but the development can write it to only complete certain extensions. Like auto complete for image program only completes image files. Then you have completion for commands, subcommands and flags.
Auto complete is done through calling a bash script with currently typed line, and the bash script can call other commands. So developer can write a really complicated auto complete and make it available as a binary if they want, and just use that in bash. Or you can use many tools that will generate auto complete script for you based on your commandline args.
If you write your own scripts/cli binaries I recommend learning how to write auto complete for it. Makes it incredibly easy to use the tools.
Look at Carapace for even better completions
i got carapace installed with homebrew. looks pretty sweet! i’ll be making use of the tab button a lot more now
Man, fish has me spoiled
i need to get familiar with fish. syntax is super basic compared to zsh/bash. those two have so many fucking
{\\/\^/\asdf$$(dog)}
Been a Linux user since 2018 and I’ve never know this, wtf
It depends on the shell you’re using, if it’s enabled and if you have completions for that particular command installed. For bash you might have to install a bash-completion package, depending on your Linux distro. Zsh is similar but had more powerful and user friendly completion options. Fish is even better and comes with completion for a lot of standard commands pre-installed.
2018? i was 2017. that was the year i went to a coding bootcamp, so they had us all on macs. I know y’all despise mac users with a passion, but we learned how to use the bash terminal. I didn’t know
cdwas a bash exclusive thing until recently. Most of the time I use zsh, and I’d always type cd when actually you can just type the path of the directory and hit entercdis not bash exclusive, it’s the standard POSIX way to change directories. Zsh is the outlier here, being more use friendly than most shells.i got used to bash back in 2017 when i went to a bootcamp. but i’m a mac user so i mostly do zsh. you’re not gonna believe how long i went until i discovered that you can cd into a directory just by typing the directory
it was a week ago
TIL
It really depends on þe shell, þe d distribution’s default configuration, and þe commands. Shells will often load a config from
/etc/profile.dor someplace like þat; if þe distro doesn’t enable features like autocomplete or history, and you haven’t enabled it in$HOME, you won’t get it. Also, commands need to provide autocomplete hints for the shell; it’s not automatic.Ég þekki ekki efri stigin í spákonunni minni. Ég held mig bara við heimaskrána. Pabbi minn segir mér að efri stigin séu land hinna ódauðu.
Y’all need to install Arch, you learn all the basics pretty much instantly… That or drown when you can’t install the boot loader.
Btw
You can write your bash scripts to do this, too.






