Beehaw
  • Communities
  • Create Post
  • search
    Search
  • Login
  • Sign Up
Gollum ( genfood@feddit.de )  to Programmer Humor@programming.dev · 3 years ago

D or d come on

i.imgur.com

message-square
73
link
fedilink
  • cross-posted to:
  • programmerhumor@lemmy.ml
796

D or d come on

i.imgur.com

Gollum ( genfood@feddit.de )  to Programmer Humor@programming.dev · 3 years ago
message-square
73
link
fedilink
  • cross-posted to:
  • programmerhumor@lemmy.ml
alert-triangle
You must log in or # to comment.
  • MonkderZweite ( MonkderZweite@feddit.ch ) 
    link
    fedilink
    arrow-up
    58
    ·
    3 years ago

    You’ve come from Windows and have brought dangerous expectations.

    • Honytawk ( Honytawk@lemmy.zip ) 
      link
      fedilink
      arrow-up
      6
      ·
      3 years ago

      Why would case sensitive path names be considered dangerous?

      • MonkderZweite ( MonkderZweite@feddit.ch ) 
        link
        fedilink
        arrow-up
        1
        ·
        3 years ago

        deleted by creator

  • SnowdenHeroOfOurTime ( SnowdenHeroOfOurTime@unilem.org ) 
    link
    fedilink
    arrow-up
    39
    ·
    3 years ago

    This is a feature, not a bug

    • MJBrune ( MJBrune@beehaw.org ) 
      link
      fedilink
      English
      arrow-up
      12
      ·
      edit-2
      3 years ago

      deleted by creator

      • bier ( bier@feddit.nl ) 
        link
        fedilink
        arrow-up
        6
        ·
        3 years ago

        Why did Linux systems go for capitals in the home folder? It’s actually kind of annoying and takes extra key presses.

        …A while later “XDG Base Directory Specification”

        • MJBrune ( MJBrune@beehaw.org ) 
          link
          fedilink
          English
          arrow-up
          10
          ·
          edit-2
          3 years ago

          deleted by creator

          • ILikeBoobies ( ILikeBoobies@lemmy.ca ) 
            link
            fedilink
            arrow-up
            1
            ·
            3 years ago

            Any help with that?

            • MJBrune ( MJBrune@beehaw.org ) 
              link
              fedilink
              English
              arrow-up
              2
              ·
              edit-2
              3 years ago

              deleted by creator

            • nyan ( nyan@lemmy.cafe ) 
              link
              fedilink
              English
              arrow-up
              1
              ·
              3 years ago

              Symlink your desired location on the target disk to the place the system thinks the software should go. (In my case, /usr/local/games is a symlink to a different drive.)

              • ILikeBoobies ( ILikeBoobies@lemmy.ca ) 
                link
                fedilink
                arrow-up
                1
                ·
                3 years ago

                Thanks

        • zlatko ( zlatko@programming.dev ) 
          link
          fedilink
          arrow-up
          2
          ·
          3 years ago

          XDG specifies the capital names, but to be nitpickingly technically precise, linux systems don’t do this. It mostly is done by the distribution maintainers, and the XDG specs. A base system does not usually have a notion of anything beyond your $HOME.

          Try adding a user: sudo adduser basicuser. If you ls -al ~basicuser you will see it’s almost empty, just the .bashrc (or in my fedora, there’s some .mozilla crap in /etc/skel that also gets bootstrapped).

      • UFO ( UFODivebomb@programming.dev ) 
        link
        fedilink
        arrow-up
        1
        ·
        3 years ago

        I like your style

  • MerfMerf ( MerfMerf@feddit.nu ) 
    link
    fedilink
    arrow-up
    36
    ·
    3 years ago

    echo ‘set completion-ignore-case On’ >> ~/.inputrc

    • PupBiru ( PupBiru@kbin.social ) 
      link
      fedilink
      arrow-up
      14
      ·
      3 years ago

      also idk does zsh do this automatically? don’t think i’ve ever had this problem except on legacy AF servers

      i mean… unless you don’t tab complete, but then who doesn’t spam tab 30 times every keystroke?

      • MerfMerf ( MerfMerf@feddit.nu ) 
        link
        fedilink
        arrow-up
        2
        ·
        3 years ago

        Or up-arrow a bazillion time because you probably have it SOMEWHERE in the buffer, surely.

    • jmcs ( jmcs@discuss.tchncs.de ) 
      link
      fedilink
      arrow-up
      2
      ·
      3 years ago

      How does that handle languages that have different rules for capitalization? For example I and i are not the same letter in Turkish.

      • MerfMerf ( MerfMerf@feddit.nu ) 
        link
        fedilink
        arrow-up
        1
        ·
        3 years ago

        Don’t know actually, never used a language like that. But should be easy enough to undo should one test it and end up not liking how it handles it.

      • kattfisk ( kattfisk@lemmy.dbzer0.com ) 
        link
        fedilink
        arrow-up
        1
        ·
        3 years ago

        I believe that type of stuff is specified in your locale, so it’s possible that it would do the right thing if you’ve set your language to Turkish. Please try it and let us know though :)

    • UFO ( UFODivebomb@programming.dev ) 
      link
      fedilink
      arrow-up
      1
      ·
      3 years ago

      Shit yo. How come I only learn this now? Thanks!

  • Feyter ( Feyter@programming.dev ) 
    link
    fedilink
    arrow-up
    26
    ·
    3 years ago

    I don’t get it… “D” is a complete different character than “d” is.

    It’s like wondering why “file1” is not opened when I typed in “file2”.

    • Swedneck ( Swedneck@discuss.tchncs.de ) 
      link
      fedilink
      arrow-up
      17
      ·
      3 years ago

      that’s not how language works though, in human language (i know this can be confusing) d and D are the same letter just in different forms.

      It’s one thing to have case sensitivity in programs doing data manipulation, that makes sense because you don’t want the program to accidentally use the wrong files without supervision.

      But when you have an interactive prompt you know what you’re doing, you can see if you entered the wrong directory, and you’re generally going to be working in directories that you have yourself organized.

      • 4am ( 4am@lemm.ee ) 
        link
        fedilink
        arrow-up
        5
        ·
        3 years ago

        Doesn’t tab completion solve this if there are no alternatives with matching case? sounds like a PBKAC

    • lemmonade ( lemmonade@lemm.ee ) 
      link
      fedilink
      arrow-up
      9
      ·
      3 years ago

      You could also say that down should not complete to download since those are completely different strings and you shouldn’t expect one to get you the other.

      • Feyter ( Feyter@programming.dev ) 
        link
        fedilink
        arrow-up
        7
        ·
        3 years ago

        Sorry, down is a substring of download I don’t get your point either?

        • Honytawk ( Honytawk@lemmy.zip ) 
          link
          fedilink
          arrow-up
          6
          ·
          3 years ago

          Substring is not string.

          If they were interchangeable, then “D” & “d” should be too.

          • Feyter ( Feyter@programming.dev ) 
            link
            fedilink
            arrow-up
            2
            ·
            3 years ago

            down matches down* because * also includes empty string. Also download matches down*

            D matches D* but d is not matching D* because D is a different character than d.

            • lemmonade ( lemmonade@lemm.ee ) 
              link
              fedilink
              arrow-up
              1
              ·
              edit-2
              3 years ago

              but why do we have to match specifically against substr*? it’s not a law of nature, we could also match against the regex (?i)substr(?-i).*

              not saying that one option is necessarily better, but I don’t see a good reason for which any one of these options would be terrible

              • Feyter ( Feyter@programming.dev ) 
                link
                fedilink
                arrow-up
                1
                ·
                3 years ago

                Because usability. If you have the files down down1 down2 downxyz and download and the user only knows that it was “something with down” it’s best to show the user everything matching “down*” and let the user decide what’s the correct one.

                Also I’m not sure but wouldn’t your expression show everything if only one character would be entered?

                And again I don’t see this solving anything if the entered string actually contains other characters then what’s in the file (D != d)

                Yes one could argue that some form of advanced algorithm or even AI could be used to identify such use case like download and Download but this is programming Humor, not linguisic Humor.

                • lemmonade ( lemmonade@lemm.ee ) 
                  link
                  fedilink
                  arrow-up
                  1
                  ·
                  3 years ago

                  would it not be usable to have completion be case insensitive? I seem to be able to use that… if I only remember “something with down”, I could just as easily forget the capitalization of “down”. maybe I have downloads and Down? why not show everything matching case insensitively and let the user decide what’s the correct one?

                  I didn’t really understand what you thought the regex did incorrectly, but I think the regex works fine, at least for most implementations, anyways what I meant is just a case insensitive version of the regular substring completion, which shouldn’t be too difficult to make.

                  The only thing it solves is the frustration of having to look for a file/directory twice because you didn’t remember it’s capitalization. again, those are different characters just like a do and downloads are different strings, but it can be easier for users if they can just press tab and let the computer fill the part of the name the don’t remember (or don’t want to type).

                  you don’t need an advanced algorithm or and AI, there are many easy ways to make completion case insensitive (like that regex for example). Issues involving names are inherently somewhat linguistic, but either way interactive shells are meant to be (at least somewhat) usable to humans, and as seen by the post, some people would prefer completion to be case insensitive.

    • schnurrito ( schnurrito@discuss.tchncs.de ) 
      link
      fedilink
      arrow-up
      8
      ·
      3 years ago

      On Windows filenames are case insensitive at least usually, some people are used to that. But that is poor design for so many reasons, Turkish I being one of them.

      • Potato Lover 💾 No brain found ( user224@lemmy.sdf.org ) 
        link
        fedilink
        English
        arrow-up
        8
        ·
        3 years ago

        Now take Android. Files are case-sensitive yet you can’t create 2 files with same name if they only vary in case.

        • Reil ( Reil@beehaw.org ) 
          link
          fedilink
          English
          arrow-up
          1
          ·
          3 years ago

          One of the most pointlessly annoying things I’ve had to deal with was trying to move a process made for Linux onto a Windows MINGW/cygwin-type environment where one of the scripts would generate “.filename” AND “.FileName” files. :|

    • 1984 ( 1984@lemmy.today ) 
      link
      fedilink
      arrow-up
      6
      ·
      3 years ago

      People want their computers to magically know what they want these days. :)

      This specific problem doesn’t exist in oh-my-zsh config though. It will find the directory even if spelling it like this.

      • PupBiru ( PupBiru@kbin.social ) 
        link
        fedilink
        arrow-up
        8
        ·
        3 years ago

        “magically know what they want” aka occasionally set you and your files on fire

        i prefer not fire

  • ayushnix ( ayushnix@lemmy.sdf.org ) 
    link
    fedilink
    English
    arrow-up
    24
    ·
    3 years ago

    using capital letters in file/directory names on Linux :|

    • jonne ( jonne@infosec.pub ) 
      link
      fedilink
      arrow-up
      25
      ·
      3 years ago

      It’s a default on some distros, unfortunately, and changing it without updating the necessary env vars will break a bunch of stuff.

      • ayushnix ( ayushnix@lemmy.sdf.org ) 
        link
        fedilink
        English
        arrow-up
        3
        ·
        3 years ago

        It would be a default on almost every distro that follows XDG specifications to have stuff like Downloads, Pictures, Videos in the $HOME folder. One of the first things I do as part of an installation is to modify ~/.config/user-dirs.dirs and set a specific folder, say /data/downloads or ~/downloads, for every XDG base directory.

  • Damage ( Damage@slrpnk.net ) 
    link
    fedilink
    arrow-up
    17
    ·
    3 years ago

    Use zsh and press tab

    • 👁️👄👁️ ( mojo@lemm.ee ) 
      link
      fedilink
      English
      arrow-up
      5
      ·
      3 years ago

      This. Except don’t use zsh because this is default in every single shell

      • chris ( chris@l.roofo.cc ) 
        link
        fedilink
        arrow-up
        17
        ·
        3 years ago

        Nope. Bash (at least by default on Ubuntu) doesn’t have case insensitive tab completion.

        • PupBiru ( PupBiru@kbin.social ) 
          link
          fedilink
          arrow-up
          2
          ·
          3 years ago

          afaik there’s options you can turn on that enable it

          search .inputrc and set completion-ignore-case On

      • Damage ( Damage@slrpnk.net ) 
        link
        fedilink
        arrow-up
        6
        ·
        3 years ago

        Bash never does this by default

        • 👁️👄👁️ ( mojo@lemm.ee ) 
          link
          fedilink
          English
          arrow-up
          1
          ·
          3 years ago

          Bash has never not had tab completion out of the box for me

          • Damage ( Damage@slrpnk.net ) 
            link
            fedilink
            arrow-up
            3
            ·
            3 years ago

            Tab completion is default, but completing an uppercase word by typing a lowercase letter is not

    • T (they/she) ( Templa@beehaw.org ) 
      link
      fedilink
      arrow-up
      3
      ·
      3 years ago

      I can’t relate to this issue at all exactly because I use zsh. Also a little bit related but the fuck

  • starman ( starman@programming.dev ) 
    link
    fedilink
    English
    arrow-up
    15
    ·
    edit-2
    3 years ago

    So you type cd D tab and it brings you to Documents

  • pchem ( pchem@feddit.de ) 
    link
    fedilink
    arrow-up
    15
    ·
    3 years ago

    $ fuck

    Comes in handy quite frequently.

  • onlinepersona ( onlinepersona@programming.dev ) 
    link
    fedilink
    English
    arrow-up
    14
    ·
    3 years ago

  • Gollum ( genfood@feddit.de ) OP
    link
    fedilink
    arrow-up
    12
    ·
    3 years ago

    I seems that I have triggered something, but keep that going, it’s quality content generation. 😬

    • drolex ( drolex@sopuli.xyz ) 
      link
      fedilink
      arrow-up
      19
      ·
      3 years ago

      Everyone on any Linux thread ever: you are a moron, obviously and you’re doing it wrong. Why don’t you install another distro, or better yet: modify and recompile your distro to match your desired experience, the code is open source ffs! What do you need? 4 years of work maybe? Come on.

      • GCostanzaStepOnMe ( GCostanzaStepOnMe@feddit.de ) 
        link
        fedilink
        arrow-up
        10
        ·
        3 years ago

        Anything that slightly improves UX is bloat.

        • drolex ( drolex@sopuli.xyz ) 
          link
          fedilink
          arrow-up
          1
          ·
          3 years ago

          True! I’ve got rid of my monitor a long time ago, who needs one? gshshhshshshhshbsbbs

          • gnutrino ( gnutrino@programming.dev ) 
            link
            fedilink
            arrow-up
            5
            ·
            3 years ago

            I got rid of my whole computer a long time ago, now I just use rocks. Much less bloat.

            • quantenzitrone ( quantenzitrone@feddit.de ) 
              link
              fedilink
              arrow-up
              1
              ·
              3 years ago

              bro that xkdc is gold

  • xnasero ( xnasero@programming.dev ) 
    link
    fedilink
    arrow-up
    10
    ·
    3 years ago

    Op does not know about $CDPATH and tab completion keke

  • ram ( ram@feddit.nl ) 
    link
    fedilink
    arrow-up
    9
    ·
    3 years ago

    There are two Linux paradigms that I consider stupid. One is the use of centralized software repositories managed by the distro instead of individual developer maintained installers. The other one is file system case sensibility. They already admitted defeat on the first one with the rise of containerised applications. I wonder how much longer they’ll keep the charade on the second one.

    • smiletolerantly ( charlotte@feddit.de ) 
      link
      fedilink
      arrow-up
      19
      ·
      3 years ago

      Sorry, but you’re plain wrong on your first issue. Getting all your packages from one source is one of the biggest upsides of Linux.

      • onlinepersona ( onlinepersona@programming.dev ) 
        link
        fedilink
        English
        arrow-up
        4
        ·
        3 years ago

        Pretty hilarious for mac users, of all people, to complain about centralisation. Like, don’t you live in a walled garden?

      • EddoWagt ( EddoWagt@feddit.nl ) 
        link
        fedilink
        arrow-up
        4
        ·
        3 years ago

        Indeed, but I’m sure we can agree that it’s pretty stupid for every distro to maintain its own repo. That’s a lot of duplicate work, which could be spend on more useful things. Luckily flatpak is well on its way to change that

        • smiletolerantly ( charlotte@feddit.de ) 
          link
          fedilink
          arrow-up
          5
          ·
          3 years ago

          Hm… But different distros have different philosophies (not just) about updates. That’s part of why people choose a specific distro.

          Theres still plenty speaking against flatpak (larger sizes, problems with GTK/qt themes, and it’s only meant for GUI applications - you still need a separate system for the kernel and lower-level/cli tools. And frankly, that makes flatpak unusable to me, because the purpose of a centralized package management system is not having duplicate systems).

          So in short: y’all are gonna pry pacman from my cold, dead hand.

          • tslnox ( tslnox@reddthat.com ) 
            link
            fedilink
            arrow-up
            3
            ·
            3 years ago

            The same goes for me, but with Portage, brother.

          • EddoWagt ( EddoWagt@feddit.nl ) 
            link
            fedilink
            arrow-up
            1
            ·
            3 years ago

            I’m not against distros as a whole, some extra work will be inevitable because people have different preferences, but it feels like a waste having a Firefox package for arch, ubuntu, fedora and Debian while essentially all being identical. Indeed flatpak isn’t perfect yet, but it works great for me and it’s steadily improving

    • MJBrune ( MJBrune@beehaw.org ) 
      link
      fedilink
      English
      arrow-up
      6
      ·
      edit-2
      3 years ago

      deleted by creator

  • Luvon ( Luvon@beehaw.org ) 
    link
    fedilink
    arrow-up
    8
    ·
    3 years ago

    cd dow *tab

  • steltek ( steltek@lemm.ee ) 
    link
    fedilink
    arrow-up
    7
    ·
    3 years ago

    Here’s how to fix this[+]

    Create $HOME/.config/user-dirs.dirs with

    XDG_DOWNLOAD_DIR=“$HOME/downloads”

    You may need to logout/in for things to reread this file.

    The full list of keys is:

    • XDG_DESKTOP_DIR
    • XDG_DOWNLOAD_DIR
    • XDG_TEMPLATES_DIR
    • XDG_PUBLICSHARE_DIR
    • XDG_DOCUMENTS_DIR
    • XDG_MUSIC_DIR
    • XDG_PICTURES_DIR
    • XDG_VIDEOS_DIR

    +: Since this is Linux, this is a fix for many but not all cases.

    • lastweakness ( lastweakness@lemm.ee ) 
      link
      fedilink
      arrow-up
      3
      ·
      3 years ago

      XDG User dirs are cool, i agree. But that’s not really the problem here

  • Kanda ( Kanda@reddthat.com ) 
    link
    fedilink
    arrow-up
    6
    ·
    3 years ago

    Just make a downloads folder if you absolutely want to go there

    • caseyweederman ( caseyweederman@lemmy.ca ) 
      link
      fedilink
      arrow-up
      7
      ·
      3 years ago

      Symlink

      • lnee ( lnee@lemm.ee ) 
        link
        fedilink
        arrow-up
        2
        ·
        3 years ago

        mount bind

        • caseyweederman ( caseyweederman@lemmy.ca ) 
          link
          fedilink
          arrow-up
          1
          ·
          3 years ago

          …why is it so hard to find a picture of a mountain with a harness on it

    • zlatko ( zlatko@programming.dev ) 
      link
      fedilink
      arrow-up
      1
      ·
      3 years ago

      ln -s Downloads downloads FTW

      • jabberati ( jabberati@social.anoxinon.de ) 
        link
        fedilink
        arrow-up
        1
        ·
        3 years ago

        deleted by creator

      • Kanda ( Kanda@reddthat.com ) 
        link
        fedilink
        arrow-up
        1
        ·
        3 years ago

        But then you’re still accessing “Downloads” and not “downloads”

Programmer Humor@programming.dev

programmer_humor@programming.dev

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !programmer_humor@programming.dev

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics
    • If the mod doesn’t find it funny, you’re banned. Ha-ha!.. For real: do not use the community for “statements”. There are other places for such content. Keep it chill and funny.
Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 633 users / day
  • 3.2K users / week
  • 5.12K users / month
  • 8.21K users / 6 months
  • 463 local subscribers
  • 33.9K subscribers
  • 1.61K Posts
  • 26.7K Comments
  • Modlog
  • mods:
  • Feyter ( Feyter@programming.dev ) 
  • adr1an ( anzo@programming.dev ) 
  • BurningTurtle ( BurningTurtle@programming.dev ) 
  • Pierre-Yves Lapersonne ( pylapp@programming.dev ) 
  • BE: 0.19.15
  • Modlog
  • Legal
  • Instances
  • Docs
  • Code