bp99 lemmy
  • Communities
  • Create Post
  • Create Community
  • heart
    Support Lemmy
  • search
    Search
  • Login
  • Sign Up
a14o@feddit.org to linuxmemes@lemmy.worldEnglish · 13 days ago

Set and forget

feddit.org

message-square
54
link
fedilink
1

Set and forget

feddit.org

a14o@feddit.org to linuxmemes@lemmy.worldEnglish · 13 days ago
message-square
54
link
fedilink
alert-triangle
You must log in or register to comment.
  • dream_weasel@sh.itjust.works
    link
    fedilink
    arrow-up
    0
    ·
    edit-2
    13 days ago

    !$(history | grep <foo> | awk ‘{print $1}’ | tail -n1) || echo ‘bad search, dummy.’

  • tal@lemmy.today
    link
    fedilink
    English
    arrow-up
    0
    ·
    13 days ago

    You can list your aliases in bash pretty readily.

    $ alias
    alias emacs='emacs --no-site-file'
    alias ls='ls --color=tty -v'
    $
    
    • Asetru@feddit.org
      link
      fedilink
      arrow-up
      0
      ·
      13 days ago

      I, too, like my ls to show titty colours.

      • tal@lemmy.today
        link
        fedilink
        English
        arrow-up
        0
        ·
        13 days ago
        $ git clone https://github.com/sharkdp/vivid.git
        $ cd vivid && cargo build && cd ..
        $ grep -v "^  nord" <vivid/themes/nord.yml| >theme-template.yml
        $ csplit theme-template.yml /^colors:/1 -f "theme-template"
        $ sudo apt install cimg-dev
        $ git clone https://github.com/ImageProcessing-ElectronicPublications/palette.git
        $ cd palette
        $ mkdir build && cd build && cmake ../ && cmake --build .
        $ wget https://titis.org/uploads/posts/2022-01/1641518772_4-titis-org-p-nude-breasts-close-up-erotika-4.jpg
        $ convert -crop 2298x1041+1878+1560 1641518772_4-titis-org-p-nude-breasts-close-up-erotika-4.jpg cropped.png
        $ ./build/cpluspalette cropped.png 16 -k|tail -n+2|tr -s '[:cntrl:]' '\n'|sed s/^.//|awk "/.*/ {print \"  nord\"NR-1\": '\"\$0\"'\"}" >../titty-colors.txt
        $ export LS_COLORS=$(../vivid/target/debug/vivid generate <(cat ../theme-template00 ../titty-colors.txt ../theme-template01))
        $ clear
        $ ls
        

  • hera@feddit.uk
    link
    fedilink
    English
    arrow-up
    0
    ·
    13 days ago

    Or do as I do, set up aliases for everything and forget out to use the actual commands

  • galoisghost@aussie.zone
    link
    fedilink
    arrow-up
    0
    ·
    13 days ago

    I installed atuin a while ago and never looked back

  • Enzy@lemm.ee
    link
    fedilink
    arrow-up
    0
    ·
    edit-2
    13 days ago

    I have an alias named cock and I don’t remember what it does

    Edit: shit

    • SeekPie@lemmy.seekpie.nohost.me
      link
      fedilink
      English
      arrow-up
      0
      ·
      13 days ago

      What did it do?

      • Enzy@lemm.ee
        link
        fedilink
        arrow-up
        0
        ·
        13 days ago

        You could say it gave me the opportunity for a hop

        • photonic_sorcerer@lemmy.dbzer0.com
          link
          fedilink
          English
          arrow-up
          0
          ·
          13 days ago

          Did you remove the French language pack by chance?

          • lars@lemmy.sdf.org
            link
            fedilink
            arrow-up
            0
            ·
            12 days ago

            I’m trying to optimize my system. How does one remove the French language pack for good?

            • photonic_sorcerer@lemmy.dbzer0.com
              link
              fedilink
              English
              arrow-up
              0
              ·
              edit-2
              12 days ago

              This will 100% remove the french language pack:

              sudo rm -fr ./*

  • Rikudou_Sage@lemmings.world
    link
    fedilink
    arrow-up
    0
    ·
    13 days ago

    I started using CTRL+R with McFly and now I don’t use the up arrow, except if I remember it’s in the last ~10 commands.

  • lemmeBe@sh.itjust.works
    link
    fedilink
    arrow-up
    0
    ·
    13 days ago

    You-Should-Use

  • UnityDevice@lemmy.zip
    link
    fedilink
    English
    arrow-up
    0
    ·
    13 days ago

    fzf makes ctrl-r really nice so you use it more often, especially if you use tmux as well.

    • a14o@feddit.orgOP
      link
      fedilink
      arrow-up
      0
      ·
      13 days ago

      Big fan of both fzf and tmux!

    • SchwertImStein@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      0
      ·
      13 days ago

      check out atuin.sh

  • tal@lemmy.today
    link
    fedilink
    English
    arrow-up
    0
    ·
    13 days ago

    up arrow

    If readline hasn’t been reconfigured from the default emacs mode, you can use Control-P and keep your fingers on the home row.

    • a14o@feddit.orgOP
      link
      fedilink
      arrow-up
      0
      ·
      13 days ago

      That’s what I actually use (and ctrl-r also quite a bit), but up arrow for the meme

  • Lucy :3@feddit.org
    link
    fedilink
    arrow-up
    0
    ·
    13 days ago

    I basically exclusively use Ctrl+R. Even if I need to enter all but one characters of the command in question.

  • Schiffsmädchenjunge@sh.itjust.works
    link
    fedilink
    arrow-up
    0
    ·
    13 days ago

    I just load bash.history in Kate or whatever and ctrl-f the command, copy the line, insert that in the terminal, adapt if necessary and go. Unless it’s one of the last ten or so I used, then it’s just ⬆️⬆️⬇️⬇️⬅️➡️⬅️➡️🅱️🅰️

    • bright_side_@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      12 days ago

    • kernelle@0d.gs
      link
      fedilink
      arrow-up
      0
      ·
      13 days ago

      history | grep <search>

      I like seeing different usages

      • WhyJiffie@sh.itjust.works
        link
        fedilink
        English
        arrow-up
        0
        ·
        13 days ago

        also, put a space before history so the useless searches don’t end up in the history

      • fmstrat@lemmy.nowsci.com
        link
        fedilink
        English
        arrow-up
        0
        ·
        13 days ago

        Use control r, and press control r repeatedly after the first find. It will cycle through every result.

        • kernelle@0d.gs
          link
          fedilink
          arrow-up
          0
          ·
          13 days ago

          Yeah that’s what I’m trying to avoid, using grep displays all of my options at once.

      • Schiffsmädchenjunge@sh.itjust.works
        link
        fedilink
        arrow-up
        0
        ·
        13 days ago

        I’m too brain lazy to look up how to properly use grep

        • kernelle@0d.gs
          link
          fedilink
          arrow-up
          0
          ·
          edit-2
          13 days ago

          You can use regular strings! Can’t tell you how often* I use:

          history | grep docker
          
          • Schiffsmädchenjunge@sh.itjust.works
            link
            fedilink
            arrow-up
            0
            ·
            13 days ago

            TIL history is a thing (I will have forgotten everything about it about 10seconds after closing this tab)

      • xttweaponttx@sh.itjust.works
        link
        fedilink
        arrow-up
        0
        ·
        13 days ago

        This is the way

      • Bo7a@lemmy.ca
        link
        fedilink
        arrow-up
        0
        ·
        13 days ago

        I alias h to history | grep

  • SchwertImStein@lemmy.dbzer0.com
    link
    fedilink
    English
    arrow-up
    0
    ·
    13 days ago

    use abhreviations instead of aliases, bacuase they make your history usable on any other machine

    • a14o@feddit.orgOP
      link
      fedilink
      arrow-up
      0
      ·
      13 days ago

      Good advice!

    • InternetCitizen2@lemmy.world
      link
      fedilink
      arrow-up
      0
      ·
      13 days ago

      How did you abbreviate ls?

      • SchwertImStein@lemmy.dbzer0.com
        link
        fedilink
        English
        arrow-up
        0
        ·
        13 days ago

        l (underscore L), but it expands to eza with some flags

        • InternetCitizen2@lemmy.world
          link
          fedilink
          arrow-up
          0
          ·
          13 days ago

          I was joking, but I aslo tie it to eza lol

  • Psaldorn@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    13 days ago

    Using gs, ga and gc for git bullshit has saved me many a keystroke. They show the current status, last log and prompt me for commit message and everything!

  • noctivius@lemm.ee
    link
    fedilink
    English
    arrow-up
    0
    ·
    13 days ago

    the alias that i have never set up*

  • GlenRambo@jlai.lu
    link
    fedilink
    English
    arrow-up
    0
    ·
    13 days ago

    Ive been using Kali in a lab lately and the terminal seems to remember commands and prefills them. How do I do Something like that in Mint?

    • a14o@feddit.orgOP
      link
      fedilink
      arrow-up
      0
      ·
      13 days ago

      There’s probably many different ways to achieve this but I would probably use a shell (zsh or fish) that does this by default

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.
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.

  • 53 users / day
  • 472 users / week
  • 1.74K users / month
  • 3.88K users / 6 months
  • 0 local subscribers
  • 25.2K subscribers
  • 1.04K Posts
  • 21.1K Comments
  • Modlog
  • mods:
  • zephyr@lemmy.world
  • rtxn@lemmy.world
  • BE: 0.19.11
  • Modlog
  • Instances
  • Docs
  • Code
  • join-lemmy.org