• errer@lemmy.world
      link
      fedilink
      English
      arrow-up
      105
      arrow-down
      2
      ·
      1 year ago

      Use ctrl +shift +c to copy in terminal

      Ah yes the classic dangerous command made safe by a modifier key. Put the gun to your head and pull the trigger, just make sure you’re holding down the shift key and it’s all good!

    • Albbi@lemmy.ca
      link
      fedilink
      arrow-up
      14
      ·
      edit-2
      1 year ago

      Ctrl+insert to copy and shift+insert also works! It was the DOS way of doing it.

      • kaba0@programming.dev
        link
        fedilink
        arrow-up
        2
        ·
        1 year ago

        Or change copy to command+c… I’m gonna be honest, OSX is right here. And quite strangely it is very hard to customize your linux to imitate that.

      • kaba0@programming.dev
        link
        fedilink
        arrow-up
        1
        ·
        1 year ago

        Or change copy to command+c… I’m gonna be honest, OSX is right here. And quite strangely it is very hard to customize your linux to imitate that.

    • Mr_Dr_Oink@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      1 year ago

      This is how my secure crt is set up when im accessing switches. If i use ctrl+c it cancels what im doing and drops back to priv mode and its so frustrating.

        • 30p87@feddit.de
          link
          fedilink
          arrow-up
          3
          ·
          1 year ago

          To be fair, I would not expect someone using a wayland WM and urxvt to use the mouse to copy-paste.

          • Jean-Mich Much@jlai.lu
            link
            fedilink
            arrow-up
            2
            ·
            1 year ago

            I understand. I’m not using sway and urxvt as someone more skilled would do. I’ve Made this config some years ago to try but nowadays I’m not doing computer things anymore but I’ve kept this config because it’s light, fast and it’s simply working. So basically, today I’m just copying my passwords from pass in urxvt to my webmail in Firefox with my mouse for checking mail …

    • Trobador@lemmy.world
      link
      fedilink
      arrow-up
      1
      arrow-down
      1
      ·
      1 year ago

      I never realized that was why people used the primaey clipboard on Linux…

      But I’ll be frank : fuck that. I’d rather disable it entirely and stop having to deal with random text pasting in bad places when I’m using the touchpad

  • spez@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    23
    ·
    1 year ago

    Kitty has the feature that if you have text selected it will copy and if not then it will interrupt the command

    • lappy@lemmy.sdf.org
      link
      fedilink
      arrow-up
      13
      ·
      1 year ago

      Yeah I love this feature. I love it so much that I’ll also tell everyone who cares to listen how you can use it. Edit your ~/.config/kitty/kitty.conf file to include map ctrl+c copy_and_clear_or_interrupt and you are good to go. Only issue I have that it doesn’t seem to work in the vscode terminal.

      • spez@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 year ago

        Any keybinds I have set don’t work in vscodium terminal for me too. I mainly use neovim for those things.

    • 4am@lemm.ee
      link
      fedilink
      English
      arrow-up
      9
      arrow-down
      5
      ·
      1 year ago

      Oh what a great way to further entrench a bad habbit! Hang on I need to remedy some refactored code with rm -rf * which Kitty made safe if I’m in a directory with my project files 🙄

  • yokonzo@lemmy.world
    link
    fedilink
    arrow-up
    6
    ·
    1 year ago

    I literally just learned about Ctrl+c last week, I’ve been using terminal casually since I was 10, and always thought it was dumb that when a script was stuck hanging that I had to close the command window and redo my steps. I always thought it was weird that you had to right click to copy something and never thought why that might be the case, I have no excuses.

    • bellsDoSing@lemm.ee
      link
      fedilink
      arrow-up
      2
      ·
      1 year ago

      I additionally mapped that latter one to F2, because being able to repeatedly copy from VIM and paste into another application without having to move your hand between mouse and keyboard is nice.

      Of course, that’s VIM. If you meant “vim mode” in shell, then that’s a different story.

  • darcy@sh.itjust.works
    link
    fedilink
    arrow-up
    1
    arrow-down
    6
    ·
    1 year ago

    press enter and then immediately CTRL+C to stop, then anytime u need u can press UP to go back to where you were

      • darcy@sh.itjust.works
        link
        fedilink
        arrow-up
        2
        arrow-down
        1
        ·
        1 year ago

        no i was trying to show my method for avoiding that. i get the joke but i was also trying to be actually helpful

        • wols@lemm.ee
          link
          fedilink
          arrow-up
          10
          ·
          1 year ago

          I can’t for the life of me figure out how your proposed method helps in the described scenario.

          Maybe I misunderstood it, can you elaborate?

        • El Barto@lemmy.world
          link
          fedilink
          arrow-up
          6
          ·
          edit-2
          1 year ago

          With your method, as soon as you hit control+C, the program is terminated.

          Or what are you doing to avoid the program being terminated?