Last active
November 29, 2019 23:14
-
-
Save ManWithBear/1991fcb778c2abb1d8ebec9d18138b4a to your computer and use it in GitHub Desktop.
My work 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
source ~/.profile | |
source ~/.git-completion.bash | |
source ~/.git-prompt.sh | |
source ~/tools/arcanist/resources/shell/bash-completion | |
export PATH="$PATH:$HOME/tools/arcanist/bin/" | |
export EDITOR="/usr/bin/vim" | |
PS1='\[\e[31m\][\[\e[0m\]\W$(__git_ps1 " (\[\e[36m\]%s\[\e[0m\])")\[\e[31m\]]\[\e[0m\]\$ ' | |
alias be='bundle exec' | |
alias ll='ls -al' | |
alias gti='git' | |
# If right now in arc path branch, checkout previous branch and delete this one | |
function finishReview() | |
{ | |
BRANCH=$(git rev-parse --abbrev-ref HEAD) | |
if [[ $BRANCH == arcpatch* ]]; | |
then | |
git co - | |
git br -D "$BRANCH" | |
fi | |
} | |
function arcd() | |
{ | |
git lfs push origin $(git rev-parse --abbrev-ref HEAD) && arc diff "$@" | |
} | |
function gittmp() | |
{ | |
git add . | |
git ci -m "gittmp" | |
} | |
function gituntmp() | |
{ | |
local msg=$(git log -1 --pretty=%B) | |
if [[ $msg == "gittmp" ]]; | |
then | |
git reset --soft HEAD~ | |
else | |
echo "Last commit message different from \"gittmp\". Do nothing. ($msg)" | |
fi | |
} | |
function tmpfolder() | |
{ | |
NAME=$(cat /dev/urandom | env LC_CTYPE=C tr -cd 'a-f0-9' | head -c 20) | |
mkdir -p /tmp/tmpfolder/$NAME | |
pushd /tmp/tmpfolder/$NAME | |
} | |
eval $(thefuck --alias) | |
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
PS1 for zsh: