Last active
June 5, 2022 00:24
-
-
Save DustinAlandzes/f173bb4266030b8f2fcf78601c58cb52 to your computer and use it in GitHub Desktop.
My .bashrc file
This file contains 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
# welcome to my .bashrc! | |
if [[ $(uname -s) == "darwin" ]]; then | |
# brew on osx | |
eval "$(/opt/homebrew/bin/brew shellenv)" | |
fi | |
# empty commit | |
alias empty-commit='git commit --allow-empty -m "this is an empty commit"' | |
# current branch | |
alias current-branch='git branch | grep "*" | cut -c 3-' | |
# push the current branch | |
alias push-current-branch='current-branch | xargs git push --set-upstream origin' | |
# shortcut to make a python 3 virtual environment | |
alias create-venv='python3 -m venv venv' | |
# shortcut for pip freeze > requirements.txt | |
alias pip-freeze-arrow-requirements-txt='pip freeze > requirements.txt' | |
# docker compose (overwriting | |
alias dc='docker-compose' | |
# autocompleteable shortcut for dc logs --tail="10" -f | |
alias dc-logs-tail-follow='dc logs --tail="10" -f' | |
# for git commit signing in pycharm: https://www.gnupg.org/documentation/manuals/gnupg/Invoking-GPG_002dAGENT.html | |
GPG_TTY=$(tty) | |
export GPG_TTY | |
# use fish if available, install with brew install fish | |
if [[ $(cat /etc/shells) == *"/opt/homebrew/bin/fish"* ]]; then | |
export fish_greeting="" | |
exec /opt/homebrew/bin/fish | |
fi |
On OSX, first change to bash from zsh using
chsh -s /bin/bash
~/.bash_profile is used instead too, so add this to .bash_profile and use .bashrc as usual.
if [ -f $HOME/.bashrc ]; then
source $HOME/.bashrc
fi
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
install with
this gist's permalink: https://gist.githubusercontent.com/DustinAlandzes/f173bb4266030b8f2fcf78601c58cb52/raw/
note that I'm adding the date at the end to avoid caching (https://stackoverflow.com/a/42263514)