Saibotk
1ed13411c8
Removed the composer and php aliases and instead added a small script to call the correct php binary. This script is placed in the macos bin folder and we add the folder to the PATH in the .zprofile within the install-mac.sh. Adding it after brew registers its paths, allows our script to be priortized instead of the currently linked php binary. Because the .zprofile file is used to setup environment variables and it being called for non-interactive sessions too, calls to php in JS scripts for example will now correctly use the isolated php version via valet.
63 lines
1.7 KiB
Bash
63 lines
1.7 KiB
Bash
# Shortcuts
|
|
|
|
# MacOS specifics
|
|
if [[ $OSTYPE == 'darwin'* ]]; then
|
|
alias clip="pbcopy"
|
|
alias copyssh="pbcopy < $HOME/.ssh/id_ed25519.pub"
|
|
alias ls="${HOMEBREW_PREFIX}/opt/coreutils/libexec/gnubin/ls"
|
|
alias reloaddns="dscacheutil -flushcache && sudo killall -HUP mDNSResponder"
|
|
alias sup="$DOTFILES/macos/bin/pkg-update"
|
|
fi
|
|
|
|
# Linux specifics
|
|
if [[ $OSTYPE == 'linux'* ]]; then
|
|
alias clip="xclip -sel clip"
|
|
alias copyssh="cat $HOME/.ssh/id_rsa.pub | clip"
|
|
|
|
alias pnpm="firejail --profile=npm pnpm"
|
|
alias yarn="firejail yarn"
|
|
alias npm="firejail npm"
|
|
fi
|
|
|
|
# General
|
|
alias reloadshell="source $HOME/.zshrc"
|
|
alias ll="ls -AhlFo --color --group-directories-first"
|
|
alias shrug="echo '¯\_(ツ)_/¯' | clip"
|
|
alias c="clear"
|
|
alias compile="commit 'compile'"
|
|
alias version="commit 'version'"
|
|
|
|
# Directories
|
|
alias dotfiles="cd $DOTFILES"
|
|
|
|
# Laravel
|
|
alias a="php artisan"
|
|
alias mfs="php artisan migrate:fresh --seed"
|
|
alias tinker="php artisan tinker"
|
|
alias seed="php artisan db:seed"
|
|
alias serve="php artisan serve"
|
|
|
|
# PHP
|
|
alias cfresh="rm -rf vendor/ && composer i"
|
|
|
|
# JS
|
|
alias nfresh="rm -rf node_modules/ && pnpm install"
|
|
|
|
# Git
|
|
alias gst="git status"
|
|
alias gb="git branch"
|
|
alias gc="git checkout"
|
|
alias gl="git log --oneline --decorate --color"
|
|
alias amend="git add . && git commit --amend --no-edit"
|
|
alias commit="git add . && git commit -m"
|
|
alias diff="git diff"
|
|
alias force="git push --force"
|
|
alias nuke="git clean -dxf && git reset --hard"
|
|
alias pop="git stash pop"
|
|
alias pull="git pull"
|
|
alias repull="git pull --autostash --rebase"
|
|
alias push="git push"
|
|
alias resolve="git add . && git commit --no-edit"
|
|
alias stash="git stash -u"
|
|
alias unstage="git restore --staged ."
|
|
alias wip="commit wip"
|