Honestly I had no idea what ctrl+d even did, I just knew it was a convenient way for me to close all the REPL programs I use. The fact that it is similar to pressing enter really surprised me, so I wanted to share this knowledge with you :)

    • @[email protected]OP
      link
      fedilink
      24 months ago

      not true. try this:

      $ date<C-d>
      

      bash did not terminate stdin, because when i press enter it still runs the command, and my shell continues to work as normal!

      you can also try this:

      $ bash --noediting
      $ date<C-d><C-d>
      

      and it will print the date.

      so something else is happening here! thats what the link talks about in detail

      • @[email protected]
        link
        fedilink
        14 months ago

        For some reason my mobile client didn’t make the article link immediately obvious. That’s actually really interesting. Apparently I was under the same common misconception. So the shell in this case is choosing to continue after detecting the flush.