If you could keep only one alias from your {bash, zsh, etc...}rc what would it be?

  • 5
    Alias ls="sl"
  • 1
    My personal preference is alias c="clear"
  • 4
    @Stuxnet ctrl-L works too, and is supported by lots of terminal programs (pretty sure libreadline will make it with other combinations "just work" for shell-like programs)
  • 1
  • 6
    I guess that'd be ´ll´

    although why bother. Shell is very good for scripting - I can easily get rid of all the aliases and recteate them as functions :)
  • 3
    Alias dcp='docker-compose -f /opt/docker/docker-compose.yml'

    Just writing dcp up -d has saved me an amazing amount of time
  • 3
    @netikras I was wondering when someone would suggest that loophole in my question 🤣
  • 1
  • 3
    Yup, ll without doubt. Shit my pants when I use someone's terminal and it doesn't have ll
  • 1
    Alias e=exit
  • 0
    alias f="thefuck"
  • 0
    @Jifuna CTRL+D
    If there's text on the line you have to CTRL+C beforehand
  • 0
    alias ll='ls -alF'
  • 1
    @ohemelaar Thx! I needed that
  • 0
  • 0
    py for python3

    It's too long to type, and being on a system with default Python 2.7, if I try to type it, I forget the 3 and wonder why things don't work.

    It's also very logical because python files end with .py
  • 2
    source .aliases
    I know, it's cheating ;P but that's how my dotfiles generally work. Aliases, color allocation and such are all separate files...

    Now for a specific alias...

    alias mp3dl='youtube-dl --add-metadata --metadata-from-title "%(artist)s - %(title)s" -x --audio-format mp3 -o "%(title)s.%(ext)s" $1'

    Maybe this one? I tend to use it only on my file server, but it's the one I think I'm currently using most often. Well, all of them are in my dotfiles for a reason of course, so yeah. I wouldn't really be able to miss any of them, that's why they're aliases to begin with :)
  • 2
    Probably quickpush "description"

    git checkout -b slugify("description")
    git add . && git commit "description"
    git push origin HEAD

    And then it uses GitHub graphql API to create a new PR to master out of that branch.

    I use it all the time to fix little bugs.
  • 2
    st="git status"
  • 1
    I'd keep these two, the rest of them I can type them if needed:

    alias u8='printf "\033%%G"'
    alias nou8='printf "\033%%@"'
Add Comment