• sgtnasty@lemmy.ml
    link
    fedilink
    arrow-up
    0
    ·
    3 months ago

    pv (Pipe Viewer) is a command line tool to view verbose information about data streamed/piped through it. The data can be of any source like files, block devices, network streams etc. It shows the amount of data passed through, time running, progress bar, percentage and the estimated completion time.

  • macattack@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    edit-2
    3 months ago

    Getting cheatsheets via curl cheat.sh/INSERT_COMMAND_HERE

    No install necessary, Also, you can quickly search within the cheatsheets via ~. For example if you copy curl cheat.sh/ls~find will show all the examples of ls that use find. If you remove ~find, then it shows all examples of ls.

    I have a function in my bash alias for it (also piped into more for readability):

    function cht() { curl cheat.sh/"$1"?style=igor|more }

  • lud@lemm.ee
    link
    fedilink
    arrow-up
    0
    ·
    edit-2
    3 months ago

    As primarily a Windows admin (Yes, we exist on Lemmy ;) ) here are few I use often.

    • Enter-PSSesion
    • Get-ADUser (also group and computer)
    • CLS (aka the superior clear)
    • ii . (short for Invoke-Item . which runs the selected object using the default method. For paths (like .) the default is explorer, so ii . opens the current directory using explorer.)
    • ft (short for Format-Table formats piped input as a table.)
    • fl (short for format-like. Used like ft but for lists.)
    • Where-Object
    • Select-Object
    • JackbyDev@programming.dev
      link
      fedilink
      English
      arrow-up
      0
      ·
      3 months ago

      Is that easier than typing clear? Also, not sure why you’d say something like that about people’s age. Anyone using terminals today is often going to run into weird quirks of them being around for decades even if they’re young.

  • Caveman@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    3 months ago

    g-push which is alias for

    git push origin `git branch --show`
    

    Which I’m writing on my phone without testing or looking

  • seth@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    3 months ago

    In my ~/.bashprofile: alias resource="source ~/.bashprofile"

    In my terminal: resource

    Anything to save a few characters

    • BaumGeist@lemmy.ml
      link
      fedilink
      arrow-up
      0
      ·
      3 months ago

      omz reload

      not going to say zsh is better than bash or fish, but oh-my-zsh does make it more attractive for some use-cases

        • BaumGeist@lemmy.ml
          link
          fedilink
          arrow-up
          0
          ·
          edit-2
          3 months ago

          I’ll have to give starship a try, seems like a cool way to handle customizing the prompt

          as to the “omz is bloat and slows down your shell”:

          1. How slow? Because I’ve never noticed. Are we talking about waiting for 15 seconds when I should only have to wait for 1, or are we talking theory and the difference between 0.5 vs 0.08 seconds in benchmarks?

          Because I’ve never been inconvenienced by the speed of my shell nor terminal emulator, despite having tried all kinds of setups. Turns out that “blazing fast” gpu accelerated terminal really didn’t make much of a difference on human timescales. Now I’m at the point where I appreciate the features over the performance.

          1. In reply to Brody’s point, I’m inclined to say “yes, and…?”

          OMZ automates a lot. Sure, I could follow his way of manulaly sourcing dozens of individual shellscripts and making my own aliases and have a zshrc 1200 lines long… Or I could just let omz handle it.

          Yes it’s mostly just a plugin manager, and…? Yes it automates a process I could do manually, and… ? Yes, it uses bindings that I didn’t personally write, and… ?

          Fuck off with the clickbait “You’re living your life wrong, do this lifehack instead!!!” (and the lifehack is to reinvent the wheel) bullshit

          Here’s a fun real lifehack: try things out for yourself, don’t just listen to and parrot other people’s opinions, don’t be afraid to go against the grain. Way more fun and fulfilling that way!

  • RagingRobot@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    3 months ago

    CTR + u will delete the whole command. I use that a lot so I don’t have to backspace. It’s saved me a ton of time

  • umbrella@lemmy.ml
    link
    fedilink
    arrow-up
    0
    ·
    3 months ago

    control+R

    in bash, it lets you quickly search for previously executed commands.

    its very useful and makes things much quicker, i recommend you give it a try.