Code Hour: Aliases

Aliases on the command line are awesome! I divide groups of aliases into three basic types:

  • git commands
  • zsh commands
  • functions

I like stealing setup files from someone who has put a lot more thought into these than I have:

A few tricks to aliases

  • Aliases are half the time for reference, the first and most important alias to remember is the one to edit your aliases!
alias open-dot=’subl ~/.dotfiles’
  • Terminal will not automatically pick up your alias updates, you can reload without restarting terminal by simply hitting the dotfile:
alias reload!=’. ~/.zshrc’
  • Start your aliases with a common letter to indicate the type as to avoid frequent alias collision. For example, all my git commands start with ‘g’ (ga, gs, gc, etc.)
  • Use aliases to jump around the file system quickly
  • Use aliases in your aliases
  • Chain aliases for super awesome wombo-combo commands

I’ll expand on functions and connecting aliases with other programs more later but my time is up!

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.