Some middle-aged guy on the Internet. Seen a lot of it, occasionally regurgitating it, trying to be amusing and informative.

Lurked Digg until v4. Commented on Reddit (same username) until it went full Musk.

Was on kbin.social (dying/dead) and kbin.run (mysteriously vanished). Now here on fedia.io.

Really hoping he hasn’t brought the jinx with him.

Other Adjectives: Neurodivergent; Nerd; Broken; British; Ally; Leftish

  • 0 Posts
  • 123 Comments
Joined 1 year ago
cake
Cake day: August 13th, 2024

help-circle

  • YouTube change things on the back end so frequently that I bet there’s always at least one bleeding-edge distro that has an outdated yt-dlp in its repository.

    But if you’re on a Debian / Ubuntu / Mint, yeah, you’re gonna have a bad time without the stand-alone version.









  • palordrolap@fedia.iotolinuxmemes@lemmy.worldah damn
    link
    fedilink
    arrow-up
    26
    ·
    3 months ago

    bind 'set completion-ignore-case on' might be your friend in Bash. It won’t help in scripts and GUIs though, so you’d still have to deal with that.

    There are ways to write functions that pick the right option intelligently, but that’s asking for trouble. One day something will create a better match for your guess and then things will go wrong, e.g. your script intelligently turns downloads into Downloads but then something actually goes and creates downloads. Your script chooses the impostor because it’s a better match. Oops.

    And then there’s always ln -s Downloads downloads. That might be enough to confuse that helpful thing that would otherwise create downloads. It’s already there, ready for use. And it works in custom scripts and things too. Until you move your script to a different user or machine, anyway.



  • palordrolap@fedia.iotolinuxmemes@lemmy.worldlinux rm
    link
    fedilink
    arrow-up
    3
    arrow-down
    1
    ·
    3 months ago

    This breaks the advice to never alias a standard command to do something radically different from its regular function.

    Sure, go ahead and alias ls to have extra options like --color, but don’t alias rm to do nothing, or even rm -i (-i is interactive and prompts for each file).

    Why? Because one day you’ll be logged into a different system that doesn’t have your cushioning alias and whoops, bye-bye files.

    Now that you think about it, you thought that ls output looked weird, but that didn’t actually break anything.

    As you suggest, yes, look into your OS’s trash option, but leave rm alone.

    GNOME-derived systems can use gio trash fileglob (or gvfs-trash on older systems) to put things in the actual desktop trash receptacle.

    KDE’s syntax sucks, but it’s kioclientX move fileglob trash:/ where X may or may not be present and is a version number of some kind.

    You could set up a shell function or script that fixes that syntax and give it any name you like - as long as it doesn’t collide with a standard one. On that rare foreign system it won’t exist and everything will be fine.


  • palordrolap@fedia.iotolinuxmemes@lemmy.worldyes
    link
    fedilink
    arrow-up
    4
    ·
    3 months ago

    This wouldn’t work.

    Well, it kind of would if you did alias downloads="cd Downloads" but then you wouldn’t cd downloads you’d just type downloads on its own.

    As other comments here already point out, you can do it with a symlink if you really want it. i.e. ln -s Downloads downloads, then you can cd downloads.

    Nowhere near the same as making everything effectively case insensitive, but it works for the odd one that you always mistype.

    There are ways to patch command completion and/or write a variant cd that does the job intelligently too, but those are harder work.

    Day-late edit that no-one will see: The answer is bind "set completion-ignore-case on". It’s embarrassing how simple this is and how long it took me to find it. I may have been trying to emulate this feature in other ways for a long time.








  • I usually set up a completely separate partition on a different drive for Timeshift. That way it doesn’t gradually eat away at system space on the main drive. And even if it was on there, it would have already eaten all that space in readiness, so to speak.

    Also, I don’t have it backing up my home directory. I do that separately.

    But that said, this post has given me the reminder to see if there are any old snapshots that could do with deleting. And there were a few. It’s now back down to roughly the same size as my main OS install again, which is about as big as it needs to be if you think about it.