• tal@lemmy.today
    link
    fedilink
    English
    arrow-up
    3
    ·
    28 days ago

    You can list your aliases in bash pretty readily.

    $ alias
    alias emacs='emacs --no-site-file'
    alias ls='ls --color=tty -v'
    $
    
      • tal@lemmy.today
        link
        fedilink
        English
        arrow-up
        0
        arrow-down
        1
        ·
        edit-2
        28 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
        

        Works for that too.

  • Lazycog@sopuli.xyz
    link
    fedilink
    arrow-up
    1
    ·
    28 days ago

    This is why I follow linux memes, I don’t know if I have ever bumped into CTRL+R but I finally can let go of

    history
    
    • tal@lemmy.today
      link
      fedilink
      English
      arrow-up
      2
      ·
      edit-2
      28 days ago

      If you haven’t used them before, there’s also ! and ^.

      ! invokes the last command starting with the following string.

      ^ searches for the last command containing the first string, replaces that string with the second, and invokes that.

      $ ls *.mp4
      Episode_One.mp4  Episode_Two.mp4
      $ !l
      ls *.mp4
      Episode_One.mp4  Episode_Two.mp4
      $ ^mp4^mp3
      ls *.mp3
      music.mp3
      $
      
      • Lazycog@sopuli.xyz
        link
        fedilink
        arrow-up
        1
        ·
        28 days ago

        I used !<index> Together with history by giving an index displayed in the history list, but did not know that you can use it like that! Also didn’t know about ^

        Thanks for the tips!

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

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

  • Schiffsmädchenjunge@sh.itjust.works
    link
    fedilink
    arrow-up
    0
    ·
    28 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 ⬆️⬆️⬇️⬇️⬅️➡️⬅️➡️🅱️🅰️

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

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

    Edit: shit

  • katy ✨@lemmy.blahaj.zone
    link
    fedilink
    arrow-up
    0
    arrow-down
    1
    ·
    28 days ago

    i like how it’s’ easier for me to do less ~/.bash_history | grep <some part of a command i want to us> instead of just doing an alias.