Cháchara Club
  • Communities
  • Create Post
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
obnomus@lemmy.ml to linuxmemes@lemmy.worldEnglish · 2 days ago

Noice

message-square
100
link
fedilink
466

Noice

obnomus@lemmy.ml to linuxmemes@lemmy.worldEnglish · 2 days ago
message-square
100
link
fedilink
alert-triangle
You must log in or register to comment.
  • thedormantotaku@lemmy.world
    link
    fedilink
    arrow-up
    2
    ·
    13 hours ago

    You can do that??

    I always did sudo !!

  • Baŝto@discuss.tchncs.de
    link
    fedilink
    English
    arrow-up
    1
    ·
    12 hours ago

    Why do you not press the up arrow + Pos1?

  • prenatal_confusion@feddit.org
    link
    fedilink
    arrow-up
    1
    ·
    15 hours ago

    Fuckit should be able to catch that

  • GarboDog@lemmy.world
    link
    fedilink
    arrow-up
    14
    ·
    1 day ago

    Wait… YOU CAN DO THAT?!

    • obnomus@lemmy.mlOP
      link
      fedilink
      English
      arrow-up
      5
      ·
      19 hours ago

      Forgot to mention but only in fish shell.

      • GarboDog@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        15 hours ago

        Ah oki lol

  • printf("%s", name);@piefed.blahaj.zone
    link
    fedilink
    English
    arrow-up
    141
    ·
    2 days ago

    MaNLkfuwl4LB6ck.jpg

    • certified_expert@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      12 hours ago
      • ctrl + p
      • ctrl + a
      • sudo [space]
      • enter
    • obnomus@lemmy.mlOP
      link
      fedilink
      English
      arrow-up
      8
      ·
      19 hours ago

      Ayo chill

      • printf("%s", name);@piefed.blahaj.zone
        link
        fedilink
        English
        arrow-up
        1
        ·
        12 hours ago

        I approve of the ice to coke ratio. I am now chill.

    • a14o@feddit.org
      link
      fedilink
      arrow-up
      1
      ·
      13 hours ago

      Start with ctrl+p, ctrl+a but yes

    • Ephera@lemmy.ml
      link
      fedilink
      arrow-up
      31
      ·
      2 days ago

      Always amused me that sudo !! is actually more keypresses (at least on keyboards where typing ! requires holding Shift).

      • printf("%s", name);@piefed.blahaj.zone
        link
        fedilink
        English
        arrow-up
        58
        ·
        edit-2
        2 days ago

        You just blew my mind. sudo [space] [shift] !! [enter] (4+1+1+1+1+1) is one keypress longer than ↑ + home + sudo + space + enter (1+1+4+1+1). In your face, universe.

        • Logi@lemmy.world
          link
          fedilink
          arrow-up
          11
          ·
          2 days ago

          If you have an actual home key. If it’s ctrl+a or (IIRC, AFK) ctrl+← then we’re even.

          And if we track hand movements then pressing ! twice may be faster than moving to another key.

          But yeah, it’s not at all clear that sudo !! is faster like you’d expect it to be.

      • Axolotl@feddit.it
        link
        fedilink
        arrow-up
        17
        ·
        2 days ago

        But it’s faster since your hand move less and you can keep shift pressed

      • Nilz@sopuli.xyz
        link
        fedilink
        arrow-up
        11
        ·
        2 days ago

        I use zsh with the sudo plugin. Double tap esc and your current or last command will be prefixed with sudo.

        • printf("%s", name);@piefed.blahaj.zone
          link
          fedilink
          English
          arrow-up
          8
          ·
          2 days ago

          I don’t dabble in black magic. /j

          It’s actually pretty neat.

    • SkaveRat@discuss.tchncs.de
      link
      fedilink
      arrow-up
      15
      ·
      2 days ago

      Ctrl A is easier to reach than the home key

      • ClownStatue@piefed.social
        link
        fedilink
        English
        arrow-up
        3
        ·
        2 days ago

        Unless you’re in a default screen session (I always thought ^A was such a dumb default for screen to use).

        • AnUnusualRelic@lemmy.world
          link
          fedilink
          arrow-up
          3
          ·
          1 day ago

          Screen must have been written by someone who wasn’t familiar with the shell. It’s the only logical explanation.

          • ClownStatue@piefed.social
            link
            fedilink
            English
            arrow-up
            1
            ·
            edit-2
            1 day ago

            Maybe someone who only used csh? I can’t remember if ^a is a default in that shell. I thought it started with ksh or bash.

            ETA: just looked it up and I’m dumb. Comes from emacs (of course) and looks like it was introduced in bash. I guess I could claim ignorance, being a VI man, but I actually knew at some point that it came from emacs. I think I can count on 1 hand the number of times I’ve used emacs

  • b161@lemmy.blahaj.zone
    link
    fedilink
    arrow-up
    10
    ·
    2 days ago

    sudo !!

    • obnomus@lemmy.mlOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      19 hours ago

      For some reason I get this

      • wpb@lemmy.world
        link
        fedilink
        arrow-up
        2
        ·
        19 hours ago

        Use zsh

  • Caveman@lemmy.world
    link
    fedilink
    arrow-up
    142
    ·
    edit-2
    2 days ago

    You can also just do a sudo !! the !! is a shorthand for whatever you tried to run previously.

    • obnomus@lemmy.mlOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      19 hours ago

      Bruh

      • Nalivai@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        14 hours ago

        What shell are you using? In both bash and zsh, !! is a substitute for a previous command

    • juipeltje@lemmy.world
      link
      fedilink
      arrow-up
      76
      ·
      2 days ago

      Was about to say, why would you copy anything when using sudo !! lol

    • lefixxx@lemmy.world
      link
      fedilink
      arrow-up
      3
      ·
      edit-2
      2 days ago

      wish i could alias that

      alias ffs=“sudo !!”

      • timbuck2themoon@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        4
        ·
        1 day ago

        alias ffs='sudo $(history -p !!)'

        • TedZanzibar@feddit.uk
          link
          fedilink
          English
          arrow-up
          2
          ·
          1 day ago

          Just to confirm: I tried this, it works.

      • Caveman@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        2 days ago

        That doesn’t work? I would have thought it would work.

        • lefixxx@lemmy.world
          link
          fedilink
          arrow-up
          2
          ·
          2 days ago

          !! Gets replaced by whatever was run before the alias command

    • devfuuu@lemmy.world
      link
      fedilink
      arrow-up
      27
      ·
      2 days ago

      Not all shells support that.

      I use fish btw.

      • furry toaster@lemmy.blahaj.zone
        link
        fedilink
        English
        arrow-up
        17
        ·
        2 days ago

        I made my own !!

        • ArchAengelus@lemmy.dbzer0.com
          link
          fedilink
          arrow-up
          17
          ·
          2 days ago

          I know what you meant (I have one for fish as well), but I chucked because you looked very enthusiastic about it!

          The fish function for !! is super useful though

      • guymontag@lemmy.ml
        link
        fedilink
        arrow-up
        2
        ·
        2 days ago

        Holy shit I wish fish supported it. I just press up arrow then hold left arrow and manually type sudo. It fucking sucks

        • eneff@discuss.tchncs.de
          link
          fedilink
          arrow-up
          6
          ·
          2 days ago

          … are you not aware of Alt+S?!

          • guymontag@lemmy.ml
            link
            fedilink
            arrow-up
            1
            ·
            16 hours ago

            Nope haha. Thanks for letting me know

        • tekino@pawb.social
          link
          fedilink
          arrow-up
          2
          ·
          1 day ago

          I’ve been using this plugin https://github.com/oh-my-fish/plugin-bang-bang fish also allows going through previous arguments with alt+up

          • guymontag@lemmy.ml
            link
            fedilink
            arrow-up
            1
            ·
            16 hours ago

            Epicc. I should install thjs

        • devfuuu@lemmy.world
          link
          fedilink
          arrow-up
          2
          ·
          1 day ago

          I’ve used it for so many years that it’s not an issue anymore. I remember using !! a lot but it was literally just for sudo. Now i either write what I need and do up or write what I need and then press alt+s, which seems even more intuitive now.

        • BolshoyToster@sh.itjust.works
          link
          fedilink
          arrow-up
          2
          ·
          2 days ago

          Does your keyboard not have a home key?

          • guymontag@lemmy.ml
            link
            fedilink
            arrow-up
            2
            ·
            16 hours ago

            Didn’t know home key could do that lol.

      • NannerBanner@literature.cafe
        link
        fedilink
        arrow-up
        7
        ·
        2 days ago

        I don’t even know what I use anymore. My distro seems to keep changing it when I reinstall.

        • unbuckled_easily933@lemmy.ml
          link
          fedilink
          English
          arrow-up
          9
          ·
          2 days ago
          echo $SHELL
          
          • NannerBanner@literature.cafe
            link
            fedilink
            arrow-up
            5
            ·
            2 days ago

            Lol, thanks. Now I know.

    • Sarcasmo220@lemmy.ml
      link
      fedilink
      arrow-up
      16
      ·
      2 days ago

      I learned something new today!

    • adeoxymus@lemmy.world
      link
      fedilink
      arrow-up
      6
      ·
      2 days ago

      I completely forgot about this one!

  • nibbler@discuss.tchncs.de
    link
    fedilink
    arrow-up
    15
    ·
    2 days ago

    I used to have an alias ‘please’ for that.

    • obnomus@lemmy.mlOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      19 hours ago

      Lmao

  • ikidd@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    74
    ·
    2 days ago

    alias fuck="sudo !!"

    • Nilz@sopuli.xyz
      link
      fedilink
      arrow-up
      37
      ·
      2 days ago

      Wait, you don’t have The Fuck installed?

      • Caveman@lemmy.world
        link
        fedilink
        arrow-up
        4
        ·
        2 days ago

        Waiting for it to be rewritten in rust

        • daeraxa@programming.dev
          link
          fedilink
          arrow-up
          2
          ·
          10 hours ago

          Only worth installing if it is 🔥🔥🔥blazing⚡⚡⚡fast

  • wpb@lemmy.world
    link
    fedilink
    arrow-up
    4
    ·
    edit-2
    2 days ago

    <Esc> k I sudo <Space> <Enter>

    • obnomus@lemmy.mlOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      19 hours ago

  • jenesaisquoi@feddit.org
    link
    fedilink
    English
    arrow-up
    4
    ·
    2 days ago

    lol no vi mode

    • obnomus@lemmy.mlOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      19 hours ago

      Vi mode?

      • jenesaisquoi@feddit.org
        link
        fedilink
        English
        arrow-up
        1
        ·
        19 hours ago

        GNU readline is the library that powers features like Ctrl-A, Ctrl-R and Alt+S. By default, it is in emacs mode - that is why it supports these shortcuts, they are the same as in emacs. It also supports vi style editing. You can switch to that by typing set -o vi in your shell. Then you can edit commands as if you were in vi, for example, instead of Ctrl-A you’d do Esc 0. Instead of Ctrl-R you’d do Esc /. If you are fluent in vi then this mode will be more useful.

        I used to work on really old Unix systems, sometimes over serial connections. They didn’t have bash (only ksh), and they didn’t understand arrow keys. Vi mode was the only way to edit commands that worked reliably.

  • Albbi@piefed.ca
    link
    fedilink
    English
    arrow-up
    17
    ·
    2 days ago

    I know alt +. inserts the last argument of previous commands. There must be a good list of alt commands somewhere because they’re pretty damn useful.

    • obnomus@lemmy.mlOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      19 hours ago

      Thanks to you, I just find out new keyboard shortcut

    • softwarist@programming.dev
      link
      fedilink
      English
      arrow-up
      8
      ·
      2 days ago

      The manual is a good place to start. It’s just GNU Readline under the hood.

  • insufferableninja@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    21
    ·
    2 days ago

    Top text should maybe say copying by, rather than copying then? Since sudo !! will automatically copy the previous command with sudo in front of it, so there’s no manual copying involved

    • obnomus@lemmy.mlOP
      link
      fedilink
      English
      arrow-up
      7
      ·
      2 days ago

      Yeah I remembered that after uploading the meme.

  • RedstoneValley@sh.itjust.works
    link
    fedilink
    arrow-up
    11
    ·
    2 days ago

    Or press Ctrl-S and take a nice walk outside

  • katy ✨@piefed.blahaj.zone
    link
    fedilink
    English
    arrow-up
    3
    ·
    2 days ago

    oh my zsh plugin just let’s you press esc twice :3

    • obnomus@lemmy.mlOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      19 hours ago

      Ayo what, I didn’t know that but I use fish.

linuxmemes@lemmy.world

linuxmemes@lemmy.world

Subscribe from Remote Instance

Create a post
You are not logged in. However you can subscribe from another Fediverse account, for example Lemmy or Mastodon. To do this, paste the following into the search field of your instance: !linuxmemes@lemmy.world

Hint: :q!


Sister communities:
  • !tech_memes@lemmy.world
  • !memes@lemmy.world
  • !lemmyshitpost@lemmy.world
  • !risa@startrek.website

Community rules (click to expand)

1. Follow the site-wide rules
  • Instance-wide TOS: https://legal.lemmy.world/tos/
  • Lemmy code of conduct: https://join-lemmy.org/docs/code_of_conduct.html
2. Be civil
  • Understand the difference between a joke and an insult.
  • Do not harrass or attack users for any reason. This includes using blanket terms, like “every user of thing”.
  • Don’t get baited into back-and-forth insults. We are not animals.
  • Leave remarks of “peasantry” to the PCMR community. If you dislike an OS/service/application, attack the thing you dislike, not the individuals who use it. Some people may not have a choice.
  • Bigotry will not be tolerated.
3. Post Linux-related content
  • Including Unix and BSD.
  • Non-Linux content is acceptable as long as it makes a reference to Linux. For example, the poorly made mockery of sudo in Windows.
  • No porn, no politics, no trolling or ragebaiting.
  • Don’t come looking for advice, this is not the right community.
4. No recent reposts
  • Everybody uses Arch btw, can’t quit Vim, <loves/tolerates/hates> systemd, and wants to interject for a moment. You can stop now.
5. 🇬🇧 Language/язык/Sprache
  • This is primarily an English-speaking community. 🇬🇧🇦🇺🇺🇸
  • Comments written in other languages are allowed.
  • The substance of a post should be comprehensible for people who only speak English.
  • Titles and post bodies written in other languages will be allowed, but only as long as the above rule is observed.
6. (NEW!) Regarding public figures

We all have our opinions, and certain public figures can be divisive. Keep in mind that this is a community for memes and light-hearted fun, not for airing grievances or leveling accusations.

  • Keep discussions polite and free of disparagement.
  • We are never in possession of all of the facts. Defamatory comments will not be tolerated.
  • Discussions that get too heated will be locked and offending comments removed.

 

Please report posts and comments that break these rules!


Important: never execute code or follow advice that you don’t understand or can’t verify, especially here. The word of the day is credibility. This is a meme community – even the most helpful comments might just be shitposts that can damage your system. Be aware, be smart, don’t remove France.

Visibility: Public
globe

This community can be federated to other instances and be posted/commented in by their users.

  • 284 users / day
  • 1.53K users / week
  • 6.53K users / month
  • 16.8K users / 6 months
  • 8 local subscribers
  • 31.5K subscribers
  • 1.64K Posts
  • 53.7K Comments
  • Modlog
  • mods:
  • zephyr@lemmy.world
  • rtxn@lemmy.world
  • BE: 0.19.11
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org