Oh my ZSH: Cheatsheet

Open config in vscode

code ~/.zshrc

Useful aliases

Switch to home folder

alias home="cd /Users/USERNAME/"

Open zsh config within VSCode

alias zshconfig="code ~/.zshrc"

Reload zsh config without closing terminal

alias zshreload="source ~/.zshrc"

Copy SSH key to clipboard

alias sshkey="cat ~/.ssh/id_rsa.pub | pbcopy"

Artisan shortcut

alias pa="php artisan"

Git shortcuts

alias ga="git add ."alias gc="git commit -m"

npm watcher shortcut

alias nrw="npm run watch"

Copies the .env.example to .env:

alias cpenv="cp .env.example .env"

Shorthand to create a new mysql database based on input:

db:new(){  mysql --user=YOURROOTUSER --password=ROOTUSERPASSWORD -e "create database $1"}

Shorthand to create a new laravel project, setup a dabtase with the same name and open the project in VS Code.

  • requires the code command from VS Code
aw:new(){  laravel new $1 && mysql --user=YOURROOTUSER --password=ROOTUSERPASSWORD -e "create database $1" && code $1}