Emoji + Bash Aliases == π
In my quest for ever-greater levels of cuteness in my dev environment, Iβve fallen in love with emoji bash aliases. These little shortcuts help me reduce keystrokes and stay in good spirits while Iβm coding.
Defining Aliases
If youβre using a Mac, press Ctrl + Command + Space to bring up your handy dandy emoji keyboard. Itβll place your recently used emojis at the top.
Hover over emojis to learn their plain text names (e.g. the detective is actually named βSleuth or spyβ) and take advantage of autocomplete.
Open up the terminal and start editing .bash_profile
in your favorite text editor. The basic formula for an alias is:
alias alias_name="command"
Here are some examples to get you started:
Git Workflow
alias βοΈ="git commit -m"
alias π="git fetch origin"
alias π‘="git status"
alias π²="git log"
alias π΅="git diff"
alias π€="git push origin"
alias πͺ="git push origin --force"
alias π="git commit --amend --no-edit;echo ...mischief managed!"
alias π="git reset --hard"
alias π‘="git remote -v"
Rails
alias π="bin/rails server"
alias π="bin/rails console"
alias π="bin/spring stop"
alias π="echo ...putting on rSpectacles! π€...;bundle exec rspec -fd"
alias π©="bin/rails db:drop; bin/rails db:create; bin/rails db:migrate;bin/rails db:seed"
alias π="bin/rails"
alias ππ£="bin/rails db:create"
alias ππ§="bin/rails db:migrate"
alias ππ±="bin/rails db:seed"
Python
alias π="python"
alias π="jupyter notebook"
Jekyll
alias β="echo ...serving up Jekyll ...;bundle exec jekyll serve & sleep 5;open http://localhost:4000"
Suggestions? Share your own aliases here.