Skip to content

Instantly share code, notes, and snippets.

@stevenhao
Created October 21, 2016 06:20
Show Gist options
  • Save stevenhao/68f64418e87d214ff024c7ba6289f316 to your computer and use it in GitHub Desktop.
Save stevenhao/68f64418e87d214ff024c7ba6289f316 to your computer and use it in GitHub Desktop.
PS1='\[\e[1;33m\][\u@\h \W \t]\$\[\e[0m\] '
PATH=~/bin:/usr/local/bin:$PATH
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
if [ -f ~/.bashrc_local ]; then
. ~/.bashrc_local
fi
function cd {
builtin cd "$@" && [ -d ~/.ctfd ] && pwd > ~/.ctfd/lastdir
}
function ctfd {
[ -d ~/.ctfd ] || echo '~/.ctfd does not exist'
[ -f ~/.ctfd/lastdir ] && cd $(cat ~/.ctfd/lastdir)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment