Skip to content

Instantly share code, notes, and snippets.

@Kangaroux
Created February 28, 2018 01:45
Show Gist options
  • Save Kangaroux/483f5653172c18ebf9212d6e84bf6a25 to your computer and use it in GitHub Desktop.
Save Kangaroux/483f5653172c18ebf9212d6e84bf6a25 to your computer and use it in GitHub Desktop.
Some quality of life improvements for bash (fix git asking for SSH key password, shorten bash prompt, etc)
# Set the prompt text (<prompt>$ )
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
debian_chroot=$(cat /etc/debian_chroot)
fi
# <user>:<cwd>$
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u:\[\033[01;34m\]\w\[\033[00m\]\$ '
# Start the ssh-agent if it's not running so you don't need to keep
# typing your password for things like git
if [ -z "$(ps -A | grep ssh-agent)" ]; then
eval "$(ssh-agent -s)"
ssh-add
fi
# Fix colors for bash on windows
export LS_COLORS='ow=01;36;40'
# Add any executables from node_modules to the PATH
export PATH="$PATH:./node_modules/.bin/"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment