Created
December 9, 2022 15:26
-
-
Save PeterDKC/f596661f9ad360a62b3962eb34a0c899 to your computer and use it in GitHub Desktop.
.bash_profile
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
# https://github.com/jimeh/git-aware-prompt | |
export GITAWAREPROMPT=~/.bash/git-aware-prompt | |
source "${GITAWAREPROMPT}/main.sh" | |
export PS1="\u@\h \W \[\$txtcyn\]\$git_branch\[\$txtred\]\$git_dirty\[\$txtrst\]\$ " | |
echo 'export PATH="/usr/local/sbin:$PATH"' | |
alias minimal-prompt="PS1='\$> '" | |
alias short-prompt="PS1='\W \$ '" | |
alias git-info-prompt="PS1='\W \[\$txtcyn\]\$git_branch\[\$txtred\]\$git_dirty\[\$txtrst\]\$ '" | |
alias full-prompt="PS1='\u@\h \W \[\$txtcyn\]\$git_branch\[\$txtred\]\$git_dirty\[\$txtrst\]\$ '" | |
# https://github.com/bobthecow/git-flow-completion/wiki/Install-Bash-git-completion | |
[[ -r "/usr/local/etc/profile.d/bash_completion.sh" ]] && . "/usr/local/etc/profile.d/bash_completion.sh" | |
multi() { | |
command="(echo {} && cd {} && "$@" && echo)" | |
echo $command | |
find . -maxdepth 1 -mindepth 1 -type d -exec sh -c "$command" \; | |
} | |
delete-merged() { | |
git branch --merged development | grep -v "\* development" | xargs -n 1 git branch -d | |
} | |
freshen() { | |
git checkout development && git pull | |
} | |
# usage: | |
# merge-upstream my/upstream-branch | |
# | |
# Make sure any changes are stashed before use. | |
merge-upstream() { | |
CURRENT_BRANCH=$(git branch --show-current) | |
git checkout $1 && \ | |
git pull && \ | |
git checkout $CURRENT_BRANCH && \ | |
git merge $1 | |
} | |
# Single File Coverage | |
cf() { | |
vendor/bin/phpunit -dmemory_limit=-1 --filter="$1" --coverage-html coverage && open coverage/index.html | |
} | |
# Run a Test Multiple Times | |
tm() { | |
vendor/bin/phpunit -dmemory_limit=-1 -dzend.enable_gc=0 --repeat $1 --filter $2 | |
} | |
versions() { | |
echo "node:" | |
node -v | |
echo "npm:" | |
npm -v | |
echo "php:" | |
php -v | |
} | |
alias art="php artisan" | |
alias sail="./vendor/bin/sail" | |
alias sart="./vendor/bin/sail artisan" | |
alias tf="vendor/bin/phpunit -dmemory_limit=-1 --filter" | |
alias tg="vendor/bin/phpunit -dmemory_limit=-1 --group" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment