Last active
June 20, 2020 02:32
-
-
Save moaazsidat/ce5a01af439691a1b387 to your computer and use it in GitHub Desktop.
Colorized, Git-friendly Terminal Setup
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
test -f ~/.git-completion.bash && . $_ | |
export CLICOLOR=1 | |
export LSCOLORS=ExFxBxDxCxegedabagacad | |
alias ls='ls -GFh' | |
alias gti='git' | |
alias gi='git' | |
alias octave='open -na Octave-cli' | |
alias unity='open -na Unity' | |
alias py27='source activate py27' | |
alias py27-d='source deactivate py27' | |
alias mp3title="~/Development/scripts/sh/mp3title.sh" | |
alias csuw="ssh -Y msidat@linux.student.cs.uwaterloo.ca" | |
# Git branch in prompt. | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} | |
red=$(tput setaf 1; tput bold) | |
green=$(tput setaf 2) | |
yellow=$(tput setaf 3) | |
magenta=$(tput setaf 5) | |
cyan=$(tput setaf 6) | |
white=$(tput setaf 7) | |
reset=$(tput sgr0) | |
export PS1="\[$yellow\]\W\[$red\]\$(parse_git_branch) \[$reset\]$ " | |
# added by Anaconda3 4.2.0 installer | |
#export PATH="//anaconda/bin:$PATH" | |
export PATH="$PATH" | |
#export PYTHONPATH="/Users/moaazsidat/Development/openai/universe://anaconda/lib/python35.zip://anaconda/lib/python3.5://anaconda/lib/python3.5/plat-darwin://anaconda/lib/python3.5/lib-dynload:/Users/moaazsidat/.local/lib/python3.5/site-packages://anaconda/lib/python3.5/site-packages://anaconda/lib/python3.5/site-packages/Sphinx-1.4.8-py3.5.egg://anaconda/lib/python3.5/site-packages/aeosa://anaconda/lib/python3.5/site-packages/setuptools-27.2.0-py3.5.egg" | |
export NVM_DIR="$HOME/.nvm" | |
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm | |
unset PYTHONPATH | |
# OPAM configuration | |
. /Users/moaazsidat/.opam/opam-init/init.sh > /dev/null 2> /dev/null || true | |
export PATH="$HOME/.cargo/bin:$HOME/bin:$PATH" | |
if command -v pyenv > /dev/null; then | |
if [ "$(type -t pyenv)" != 'function' ]; then | |
eval "$(pyenv init -)" | |
eval "$(pyenv virtualenv-init -)" | |
fi | |
fi | |
export PIP_EXTRA_INDEX_URL=https://pypi.fury.io/hiHw3mWv51mT7okSMCZU/dialogue/ | |
export GEMFURY_TOKEN=hiHw3mWv51mT7okSMCZU | |
if which pyenv-virtualenv-init > /dev/null; then eval "$(pyenv virtualenv-init -)"; fi | |
git() { | |
if [[ $@ == "-dob" ]] || [[ $0 == "--delete-old-branches" ]]; then | |
command git remote prune origin | |
command git branch -vv | grep 'origin/.*: gone]' | awk '{print $1}' | xargs git branch -D | |
else | |
command git "$@" | |
fi | |
} |
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
test -f ~/.git-completion.bash && . $_ | |
export CLICOLOR=1 | |
export LSCOLORS=ExFxBxDxCxegedabagacad | |
alias ls='ls -GFh' | |
# Git branch in prompt. | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} | |
red=$(tput setaf 1; tput bold) | |
green=$(tput setaf 2) | |
yellow=$(tput setaf 3) | |
magenta=$(tput setaf 5) | |
cyan=$(tput setaf 6) | |
white=$(tput setaf 7) | |
reset=$(tput sgr0) | |
export PS1="\[$yellow\]\W\[$red\]\$(parse_git_branch) \[$reset\]$ " |
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
if [ -f ~/.git-completion.bash ]; then | |
. ~/.git-completion.bash | |
fi | |
export CLICOLOR=1 | |
export LSCOLORS=ExFxBxDxCxegedabagacad | |
alias ls='ls -GFh' | |
# Git branch in prompt. | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} | |
#export PS1="\u@\h \W\[\033[32m\]\$(parse_git_branch)\[\033[00m\] $ " | |
#export PS1='\e[33;1m\u@\h: \e[31m\W\e[0m\$ ' | |
export PS1="\\[\e[33;1m\u@\h: \e[31m\W\e[0m\033[32m\]\]\$(parse_git_branch)\[\033[00m\] $ " |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment