11 shell aliases you'll use today [Terminal Velocity 2]

แชร์
ฝัง
  • เผยแพร่เมื่อ 16 ม.ค. 2025

ความคิดเห็น • 15

  • @JavierHarford
    @JavierHarford 2 ปีที่แล้ว +3

    It's criminal that this video and other terminal velocity videos don't have more likes, thanks from a fish user!

  • @voidmind
    @voidmind 2 ปีที่แล้ว +2

    Holy crap your zsh scripts are almost all useful for me! Glad to learned about exa too. You should check out "bottom", a rust based task manager similar to htop

  • @Majiy00
    @Majiy00 ปีที่แล้ว

    Great video! nicked some of your aliases. You've got yourself a new susbscriber!

  • @Oswee
    @Oswee 2 ปีที่แล้ว +2

    Have you tried Ctrl + l (L) to clear the terminal?

  • @radustoleru9109
    @radustoleru9109 2 ปีที่แล้ว

    great aliases, especially I liked json format trick!
    I'm also a fun of keeping things clean so I just use CRL+L when I want to clear the terminal

  • @dankhoa
    @dankhoa 2 ปีที่แล้ว

    this is super handy, thank you so muchhh

  • @superhero-studios
    @superhero-studios 8 หลายเดือนก่อน

    For clearing terminals, I always use CMD+K. Though `c` is one less keystroke.

  • @Chalisque
    @Chalisque ปีที่แล้ว

    I stick with the destructive rm. But what I do is to alias things so that I have to type remove x rather than rm whatever. I have 'rsync -haux --progress' aliased to rs as I use it a log. And the accident waiting to happen (and has happened, though thankfully nothing was lost), was typing rm list-of-files target instead of rs list-of-files target. rm is too destructive to warrant a two-letter name.
    (I do something similar with poweroff and reboot so that on the servers in my flat, I have to type e.g. sudo poweroff-titch or sudo reboot-midge so that I can be sure I'm poweroff'ing or rebooting the right machine -- I have rebooted the wrong machine before.)

  • @waltermas736
    @waltermas736 ปีที่แล้ว +1

    Side note: Nice using control-z in vim and fg to get back

  • @Chalisque
    @Chalisque ปีที่แล้ว

    Oh, and while alias gives a list of aliases, it doesn't list functions. For that, under bash at least, you type declare -f

  • @GuilhermeTeixeira
    @GuilhermeTeixeira ปีที่แล้ว +1

    I use an alias to show only hidden/dot files:
    alias lh='ls -ld .?*'

  • @Chalisque
    @Chalisque ปีที่แล้ว

    These are scripts rather than aliases, but I have a pp and pc for paste and copy, which work the same on mac, windows, cygwin, wsl and linux by abstracting over whatever utility is needed to access the clipboard. Thus I can use `pp | jsonpp | pc` on any machine. I then have pcwd to copy the current directory, cdpp to cd to whatever is in the clipboard, amongst others.
    #!/bin/dash
    if [ -n "$DISPLAY" ]; then # X11
    paste() { xsel -o -b; }
    elif [ -d "/Applications" ]; then # macos
    paste() { pbpaste; }
    elif [ -d "/cygdrive/c/cygwin64" ]; then # cygwin
    paste() { cat /dev/clipboard; }
    else
    echo "Cannot paste as not gui" 1>&2
    fi
    if [ -n "$1" ]; then
    paste | tee "$1"
    else
    paste
    fi
    #!/bin/dash
    # copy to clipboard
    if [ -n "$DISPLAY" ]; then # X11
    cat "$@" | xsel -i -b
    elif [ -d "/Applications" ]; then # macos
    cat "$@" | pbcopy
    elif [ -d "/cygdrive/c/cygwin64" ]; then # cygwin
    cat "$@" > /dev/clipboard
    else
    echo "Cannot copy as not gui" 1>&2
    fi

  • @allefdouglas9693
    @allefdouglas9693 ปีที่แล้ว

    alias :q="exit"