Skip to content

Instantly share code, notes, and snippets.

@bennettmcelwee
Last active October 27, 2016 22:11
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 bennettmcelwee/dc15eaf4ef4f00680b9a to your computer and use it in GitHub Desktop.
Save bennettmcelwee/dc15eaf4ef4f00680b9a to your computer and use it in GitHub Desktop.
if [ -f ~/bin/sensible.bash ]; then
source ~/bin/sensible.bash
fi
if [ -f ~/bin/git-completion.bash ]; then
source ~/bin/git-completion.bash
fi
export EDITOR="open -t -n -W"
### Set the prompt
usertext='\u'
prompttext='$'
sshtext=
if [ -n "$SSH_CLIENT" ];
then sshtext='\[\e[32m\]ssh\[\e[90m\]'
fi
if [ $(id -u) -eq 0 ];
then
usertext='\[\e[91m\]\u\[\e[39m\]'
prompttext='#'
fi
export PS1='\[\e[90m\]'${usertext}'@\h \t \w\n'${sshtext}${prompttext}'\[\e[39m\] '
### Useful aliases
alias ll="ls -Fla"
# cd to a Windows path (e.g. wd 'C:\Foo\Bar')
# wd() { cd "`echo $1 | sed 's/^\\(\\w\\):/\\/\\1/' | sed 's/\\\\/\\//g'`"; }
# Create an alias to cd to the current directory
a() { alias $1=cd\ $PWD; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment