• pmk@lemmy.sdf.org
    link
    fedilink
    arrow-up
    8
    arrow-down
    1
    ·
    edit-2
    2 days ago

    Found it in the classic The UNIX Programming Environment from 1984:

    But then, this is for return, which technically isn’t “enter”, but nowadays they are sort of interpreted the same by programs?

    • mina86@lemmy.wtfOP
      link
      fedilink
      English
      arrow-up
      4
      ·
      edit-2
      2 days ago

      Yeah, it’s a bit philosophical.

      • In graphical applications, Ctrl+M, Ctrl+J and Return/Enter are all different things.
      • In a terminal in raw mode, Ctrl+M and Return/Enter are the same thing but Ctrl+J is something different. You can for example run bind -x '"\C-j":"echo a"' in bash and Ctrl+J will do something different.
      • In a terminal in canonical mode, they are all the same thing. There probably are some stty options which can change that though.