Last active
March 8, 2025 09:53
-
-
Save devzom/940c5fcc657c6e81abc8c82a940d8acf to your computer and use it in GitHub Desktop.
ZSH: custom aliases
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ZSH Aliases on MacOs | |
## For a full list of active aliases, run `alias`. | |
# NAVIGATION | |
alias ..="cd .." | |
alias ...="cd ../.." | |
alias ....="cd ../../.." | |
alias .....="cd ../../../.." | |
# COMMON DIRECTORIES | |
alias dl="cd ~/Downloads" | |
alias dt="cd ~/Desktop" | |
alias dc="cd ~/Documents" | |
alias dev="cd ~/dev" | |
alias home="cd ~" | |
# DEV | |
alias code="code-insiders ." | |
alias pnd="pnpm run dev" | |
alias pn="pnpm " | |
alias rmnode="rm -rf node_modules" | |
# GIT | |
alias gitconfig="nano ~/.gitconfig" # edit global git configuration | |
alias gits="git status" | |
alias gitd="git diff" | |
alias gitl="git lg" | |
alias gita="git add ." | |
alias gitp="git fetch & git pull" | |
alias gitc="git commit" | |
alias gitcz="cz commit" | |
alias gitc="git checkout" | |
alias gitcm="gitc checkout main & git pull" | |
alias gitr="git pull --rebase origin main" | |
alias gitpf="git push --force-with-lease" | |
# UTILS | |
alias zshconfig="nano ~/.zshrc" # edit global zsh configuration | |
alias zshsave="source ~/.zshrc" # reload zsh configuration | |
alias sshhome="cd ~/.ssh" # navigate to global ssh directory | |
alias sshconfig="nano ~/.ssh/config" # edit global ssh configuration | |
## Brew | |
alias brewup="brew update; brew upgrade; brew cleanup; brew doctor" | |
alias brewr="arch -x86_64 /usr/local/bin/brew $@" | |
alias leg="arch -x86_64 $@" | |
alias phpconfig="open -e /usr/local/etc/httpd/httpd.conf" | |
alias phprestart="brew services restart httpd" | |
alias pg_start="brew services start postgresql" | |
alias pg_stop="brew services stop postgresql" | |
## Docker | |
alias dk="docker-compose" | |
## artisan/composer | |
alias pha="php artisan" | |
alias pca="composer" | |
alias ip="ipconfig getifaddr en0" # get machine's ip address |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment