Last active
October 27, 2016 22:11
-
-
Save bennettmcelwee/dc15eaf4ef4f00680b9a to your computer and use it in GitHub Desktop.
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 ~/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