Skip to content

Instantly share code, notes, and snippets.

@ivarprudnikov
Last active December 8, 2023 10:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ivarprudnikov/fff4c8f45457898df12c22a707341ffb to your computer and use it in GitHub Desktop.
Save ivarprudnikov/fff4c8f45457898df12c22a707341ffb to your computer and use it in GitHub Desktop.
Bash setup
echo "Setup prompt appearance"
# to add username@hostname to prompt, then prepend the following:
# \[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]
# The promp should look like:
# ~/Documents/project $ gitbranch _
export PS1="\[\033[32m\]\w\[\033[00m\] \$ \[\033[34m\]\$(git branch 2>/dev/null | grep '^*' | colrm 1 2)\[\033[00m\] "
# On FreeBSD and Mac OS X, ls shows colors if the CLICOLOR environment variable is set
export CLICOLOR=1
export LSCOLORS=ExFxBxDxCxegedabagacad
# by default show list with sizes, show hidden
alias ls='ls -lAGFh'
# WSL is too lazy to do this
if [ -z "$SSH_AUTH_SOCK" ]; then
echo "Load ssh agent and add keys"
eval $(ssh-agent -s)
ssh-add
ssh-add ~/.ssh/id_ed25519_mykey
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment