this post was submitted on 13 Dec 2025
434 points (97.0% liked)

linuxmemes

28434 readers
2518 users here now

Hint: :q!


Sister communities:


Community rules (click to expand)

1. Follow the site-wide rules

2. Be civil
  • Understand the difference between a joke and an insult.
  • Do not harrass or attack users for any reason. This includes using blanket terms, like "every user of thing".
  • Don't get baited into back-and-forth insults. We are not animals.
  • Leave remarks of "peasantry" to the PCMR community. If you dislike an OS/service/application, attack the thing you dislike, not the individuals who use it. Some people may not have a choice.
  • Bigotry will not be tolerated.
  • 3. Post Linux-related content
  • Including Unix and BSD.
  • Non-Linux content is acceptable as long as it makes a reference to Linux. For example, the poorly made mockery of sudo in Windows.
  • No porn, no politics, no trolling or ragebaiting.
  • Don't come looking for advice, this is not the right community.
  • 4. No recent reposts
  • Everybody uses Arch btw, can't quit Vim, <loves/tolerates/hates> systemd, and wants to interject for a moment. You can stop now.
  • 5. πŸ‡¬πŸ‡§ Language/язык/Sprache
  • This is primarily an English-speaking community. πŸ‡¬πŸ‡§πŸ‡¦πŸ‡ΊπŸ‡ΊπŸ‡Έ
  • Comments written in other languages are allowed.
  • The substance of a post should be comprehensible for people who only speak English.
  • Titles and post bodies written in other languages will be allowed, but only as long as the above rule is observed.
  • 6. (NEW!) Regarding public figuresWe all have our opinions, and certain public figures can be divisive. Keep in mind that this is a community for memes and light-hearted fun, not for airing grievances or leveling accusations.
  • Keep discussions polite and free of disparagement.
  • We are never in possession of all of the facts. Defamatory comments will not be tolerated.
  • Discussions that get too heated will be locked and offending comments removed.
  • Β 

    Please report posts and comments that break these rules!


    Important: never execute code or follow advice that you don't understand or can't verify, especially here. The word of the day is credibility. This is a meme community -- even the most helpful comments might just be shitposts that can damage your system. Be aware, be smart, don't remove France.

    founded 2 years ago
    MODERATORS
    top 50 comments
    sorted by: hot top controversial new old
    [–] lastweakness@lemmy.world 5 points 15 hours ago (2 children)
    [–] bigfondue@lemmy.world 2 points 14 hours ago

    The spirit of the 1990s is alive and well!

    [–] alias_qr_rainmaker@lemmy.world -1 points 13 hours ago

    i need to get familiar with fish. syntax is super basic compared to zsh/bash. those two have so many fucking {\\/\^/\asdf$$(dog)}

    [–] FishFace@piefed.social 108 points 1 day ago (1 children)

    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.

    [–] alias_qr_rainmaker@lemmy.world 8 points 1 day ago (2 children)

    I have two Linux VMs, one Fedora, the other Arch. I'm guessing tab autocompletes are built into those as well?

    [–] ulterno@programming.dev 10 points 1 day ago* (last edited 1 day ago)

    In case of Arch, for bash, you have the bash-completions package, apart from which some program packages install their own bash completions.
    Then there is also zsh-completions for zsh.

    I remember having to install them separately, but maybe you know some package group that did it for you.

    [–] voytrekk@sopuli.xyz 6 points 1 day ago (1 children)

    Arch has the packages, but it won't be installed by default.

    load more comments (1 replies)
    [–] callyral@pawb.social 14 points 1 day ago (1 children)

    I usually use --help as it also gives descriptions for the command, though some programs may only accept -h or no argument to show the help menu.

    [–] crater2150@feddit.org 4 points 22 hours ago (1 children)

    In zsh, you can configure the completion to also show descriptions.

    [–] callyral@pawb.social 1 points 21 hours ago

    Interesting, I use fish shell and as far as I know it just shows you the options for most programs.

    [–] trxxruraxvr@lemmy.world 52 points 1 day ago (7 children)

    Anyone who is learning new stuff in this thread should really try fish, it makes using the command line so much nicer.

    [–] Viking_Hippie@lemmy.dbzer0.com 34 points 1 day ago (1 children)

    Finally, a command line shell for the 90s

    πŸ˜„

    [–] Quill7513@slrpnk.net 8 points 1 day ago

    (originally debuted in the mid aughts)

    [–] alias_qr_rainmaker@lemmy.world 9 points 1 day ago (1 children)

    I started out with bash, then eventually realized that I was using zsh because I'm a macbro. I'm a little slow :(

    [–] ozymandias117@lemmy.world 9 points 1 day ago (1 children)

    To be fair, they only switched to zsh in 2019, so a lot of tutorials probably still assume bash

    load more comments (1 replies)
    [–] replicat@lemmy.world 4 points 1 day ago* (last edited 1 day ago)

    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

    [–] Natanox@discuss.tchncs.de 6 points 1 day ago

    Just tried it, working is indeed nicer after some nice fresh tuna and Sushi.

    load more comments (2 replies)
    [–] tulliandar@lemmy.world 4 points 19 hours ago (1 children)

    Look at Carapace for even better completions

    [–] alias_qr_rainmaker@lemmy.world -1 points 14 hours ago

    i got carapace installed with homebrew. looks pretty sweet! i'll be making use of the tab button a lot more now

    [–] Multiplexer@discuss.tchncs.de 66 points 1 day ago (14 children)

    interesting, didn't know that... Will try!

    Finding out about "Ctrl-r" also was a gamechanger.

    [–] Sibbo@sopuli.xyz 31 points 1 day ago (1 children)
    [–] Multiplexer@discuss.tchncs.de 54 points 1 day ago* (last edited 1 day ago) (4 children)

    Lets you easily and interactively search your command history.
    Half the stuff I do is usually preceded by that, it's really useful!

    [–] JustJack23@slrpnk.net 99 points 1 day ago (2 children)

    Oh that is nice, I usually use ↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑

    [–] mech@feddit.org 8 points 1 day ago

    "I knew I had an ls somewhere in my history"

    [–] ClownStatue@piefed.social 9 points 1 day ago

    That’s part of the natural progression. Can’t remember if that comes before or after β€œhistory | grew command.”

    [–] chtk@sh.itjust.works 19 points 1 day ago (1 children)

    Adding fzf to the mix makes Ctrl+r even better.

    load more comments (1 replies)
    [–] 69420@lemmy.world 6 points 1 day ago (1 children)

    Just wait until you discover fish/zsh autosuggestions.

    load more comments (1 replies)
    load more comments (1 replies)
    [–] farcaller@fstab.sh 15 points 1 day ago (2 children)
    load more comments (2 replies)
    load more comments (12 replies)
    [–] thevoidzero@lemmy.world 14 points 1 day ago (1 children)

    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.

    [–] alias_qr_rainmaker@lemmy.world 5 points 1 day ago (1 children)

    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

    [–] thevoidzero@lemmy.world 5 points 1 day ago

    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 play then 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.

    [–] user224@lemmy.sdf.org 7 points 1 day ago (1 children)

    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)

    [–] antimidas@sopuli.xyz 3 points 1 day ago* (last edited 1 day ago)

    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)

    [–] notreallyhere@lemmy.world 16 points 1 day ago (1 children)
    [–] lazynooblet@lazysoci.al 27 points 1 day ago (12 children)

    Does it depend on some shell or shell extension? My bare bones Debian installs don't do this. Powershell does but I'd like it on Linux too.

    [–] chtk@sh.itjust.works 17 points 1 day ago (1 children)

    I think on Debian you need to install bash-completion to get bash to complete flags.

    load more comments (1 replies)
    [–] smeg@feddit.uk 15 points 1 day ago (6 children)

    You can install powershell on Linux if you're feeling masochistic

    load more comments (6 replies)
    load more comments (10 replies)
    [–] Allero@lemmy.today 9 points 1 day ago* (last edited 1 day ago)

    Incredibly stupid, but should work

    My favorite kind of advice

    [–] pedz@lemmy.ca 7 points 1 day ago (2 children)

    For a moment I thought that 'commandName -' was some PowerShell stuff.

    load more comments (2 replies)
    [–] Epzillon@lemmy.world 10 points 1 day ago (6 children)

    Been a Linux user since 2018 and I've never know this, wtf

    [–] trxxruraxvr@lemmy.world 15 points 1 day ago

    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.

    load more comments (5 replies)
    load more comments
    view more: next β€Ί