• @[email protected]
    link
    fedilink
    English
    62 years ago

    I’ve never used a distro that didn’t come with a sane default shell config to avoid this

  • sophs
    link
    fedilink
    English
    112 years ago

    Idk about bash but at least in fish I can do alt + arrows to move the cursor by word, also alt + backspace works to delete whole words.

  • @[email protected]
    link
    fedilink
    English
    12 years ago

    Train yourself to use edit-and-execute and this problem disappears forever. Now I’m annoyed when I type “esc v v” and nothing happens.

  • @[email protected]
    link
    fedilink
    English
    82
    edit-2
    2 years ago

    Ctrl+a - go to beginning of line (alpha? I dunno)

    ctrl+e - go to (e)nd of the line

    alt+f - (f)orward one word

    alt+b - (b)ack one word

    You might already know these but no one else has posted them on this thread yet. I work in both Linux and Mac a lot and this works for them. No idea about Windows I’m no longer forced to use it at work 🙂

    • @[email protected]
      link
      fedilink
      English
      31
      edit-2
      2 years ago

      Actually, most linux terminal allows you to change shortcut in terminal to just use ctrl-c and ctrl-v.

      • Drew Belloc
        link
        fedilink
        English
        172 years ago

        If i knew it before, now my brain just knows that it need to press shift on the terminal

        • @[email protected]
          link
          fedilink
          English
          62 years ago

          By default, yes, but most terminal allow you to just open the setting and change the keybinding. And even Ctrl-c will work as you expect, it will copy when text is selected, and terminate command otherwise.

    • TWeaK
      link
      fedilink
      English
      162 years ago

      More often it’s Ctrl + backspace that doesn’t work. Ctrl + <- works nearly everywhere.

        • TWeaK
          link
          fedilink
          English
          5
          edit-2
          2 years ago

          I hope you don’t expect that to convince me to upgrade. That doesn’t even make up for what they did to the taskbar.

          • @[email protected]
            link
            fedilink
            English
            2
            edit-2
            2 years ago

            They’ve since updated it to allow you to display labels & not condense multiple windows into one button so it’s better than ever. I can’t believe it took until 11 to center the items, left aligning was a literal pain in the neck especially on ultrawide screens.

            • TWeaK
              link
              fedilink
              English
              12 years ago

              I prefer the left alignment, but I’m glad to hear they finally fixed the combined button thing. I still won’t stand for the right click menus and general fuckery with settings pages and keyboard shortcuts.

    • @[email protected]
      link
      fedilink
      English
      32 years ago

      CTRL-C has been the default key combination to terminate a running process, since forever. Reassigning it to “copy selection” would be very inconvenient.

      I like the solution of the ElementaryOS terminal: when you press CTRL-C, it does “the right thing” depending on the context.

    • @[email protected]
      link
      fedilink
      English
      262 years ago

      Because terminal emulators are literally the old terminal emulators (ye oldy screens + keyboard combos that looked like a computer but were just IO) and everything modern they do is just a hack.

      • @[email protected]
        link
        fedilink
        English
        16
        edit-2
        2 years ago

        Terminals with screens? What’s all that newfangled shit?

        Nah, whippersnapper, this tech goes all the way back to teletypes. You didn’t get a fancy-shmancy “screen;” instead, it printed out the results of your commands. On actual paper!


        Seriously though, that’s why the device files for terminals in Linux are named tty[$NUM] – “tty” is shorthand for “TeleTYpe.”

        I believe it’s also why really primitive programs can’t scroll up and do things like writing an entire screen worth of content in order to emulate interactivity (as opposed to seeking the cursor backwards and replacing only the parts the program wants to replace): they’re using a version of the control protocol so primitive that it didn’t have a function to go backwards because teletypes didn’t need it due to physical impossibility. (That’s my theory, anyway – I haven’t dug deep enough into the guts of TERMCAP etc. to be sure. I’m also not actually old enough to have experienced that stuff, despite my joke above.)


        Edit: look at this excerpt from man terminfo(5), for instance:

        Basic Capabilities
        The number of columns on each line for the terminal is given by
        the cols numeric capability.  If the terminal is a CRT, then the
        number of lines on the screen is given by the lines capability.
        If the terminal wraps around to the beginning of the next line
        when it reaches the right margin, then it should have the am
        capability.  If the terminal can clear its screen, leaving the
        cursor in the home position, then this is given by the clear
        string capability.  If the terminal overstrikes (rather than
        clearing a position when a character is struck over) then it
        should have the os capability.  If the terminal is a printing
        terminal, with no soft copy unit, give it both hc and os.
        

        To this day, the info database entry for your virtual terminal has to specify that it’s capable of deleting a line of text instead of merely striking it out, because some terminals back in the day actually couldn’t!

    • SokathHisEyesOpen
      link
      fedilink
      English
      29
      edit-2
      2 years ago

      Because fuck you! That’s why!

      Edit: serious answer, I’m pretty sure it’s outputting the key events to the terminal line.

      • EnPeZe
        link
        fedilink
        English
        72 years ago

        Hey, I actually knew that shortcut! But it never occurred to me that ctrl+arrow just moves the cursor without selecting anything.

        wild stuff.

  • @[email protected]
    link
    fedilink
    English
    212 years ago

    What happens to me is the opposite. I got used to Ctrl+w to delete a word in terminal and accidentally closed browser tabs many times while typing in them.