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)}The spirit of the 1990s is alive and well!
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
TIL
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)That would be the dream indeed. It’s so fluid after you learn it. Other networking equipment often has good configuration CLIs as well (like juniper and vyos), but Cisco is probably the best in my experience. It’s also nice how consistent they are across generations.
You can get about as close as it’s possible in a normal operating system with zsh and plugins like zsh-autocomplete. Bash tries to pick up the possible alternatives from context as well (with tab suggestions) that act somewhat like
?on Cisco CLI, but implementing it is left up to the command itself to provide for the shell. Many commands luckily provide very robust autocompletion to bash out-of-the-box, especially if installed via the system package manager.Unfortunately we’ll probably never reach the point of actual configuration CLIs since they only have a set amount of commands that are developed by the same company. It would be close to impossible to achieve the same level of standardisation for a general operating system, as we don’t know the entire configuration of the system and there are multiple incompatible flag schemes. (As styles go, things like dd and ffmpeg throw a wrench in the works with their non-standard flags)
I usually use
--helpas it also gives descriptions for the command, though some programs may only accept-hor no argument to show the help menu.In zsh, you can configure the completion to also show descriptions.
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.
i was in the dark for so long because i thought tab autocompletions only worked with file paths. i can’t believe that whole time i didn’t even accidentally hit tab once on a command
I guess it can go unnoticed, I use Arch so maybe that’s why I got more involved. I remember searching why auto completion didn’t work, then finding out I need to install bash-completions package. After knowing that it makes one curious about how it works. Then the next stage is writing it for my own programs because it obviously won’t come with bash-completions package.
I once wrote a shell (terminal) to watch anime, and I wrote auto completion for different commands on it, it was really nice to just type
playthen prefix and then tab for auto completion on anime names, and even for episodes I wrote auto completion give me last episode I watched + 1.
Incredibly stupid, but should work
My favorite kind of advice
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.
-h
ls -Slut
For a moment I thought that ‘commandName -’ was some PowerShell stuff.
Powershell does that too
It can’t hurt to know this but to me PS is not intuitive, looks like SomeLongString-ActingLikeA-Command, and I avoid it as much as using Windows in the first place, unless absolutely necessary.
I never install that. I like they behavior of my prompt just like it is.
i tweak the fuck out of my prompt my dude, i’m all about that
echo $PROMPT | sed "s/\{|\}|/ /g"
Why not just install tealdeer tho??
implying i know what the fuck a teal deer is
A TLDR alternative to man pages
While a man page is for every possible flag available for a command,
A tldr is for the most common tasks a command can do.tldr fcfc Open the most recent command for editing and then run it. More information: https://www.gnu.org/software/bash/manual/bash.html#index-fc. - Open the last command in the default system editor and run it after editing: fc - Specify an editor to open with: fc -e 'emacs' - List recent commands from history: fc -l - List recent commands in reverse order: fc -l -r - Edit and run a command from history: fc number - Edit commands in a given interval and run them: fc '416' '420' - Display help: fc --help
Anyone who is learning new stuff in this thread should really try fish, it makes using the command line so much nicer.
https://github.com/microsoft/inshellisense if you have to stay with Bash :)
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
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

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.
Finally, a command line shell for the 90s
😄
(originally debuted in the mid aughts)
Just tried it, working is indeed nicer after some nice fresh tuna and Sushi.
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.
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.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










