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 :)

  • skepller@lemmy.world
    link
    fedilink
    arrow-up
    1
    arrow-down
    1
    ·
    edit-2
    1 day ago

    This!

    It’s merely a buffer flush, in case it’s empty, the program handling the input can choose how to interpret, cat decides to do it as an EOF.

    Reason why it also works as exit.