Skip to content

Instantly share code, notes, and snippets.

@jeapostrophe
Created June 3, 2010 22:13
Show Gist options
  • Save jeapostrophe/424581 to your computer and use it in GitHub Desktop.
Save jeapostrophe/424581 to your computer and use it in GitHub Desktop.
source ~/.profile
hash -d ws=$PLTHOME/collects/web-server
hash -d drdr=$PLTHOME/collects/meta/drdr
hash -d work=$PROJS
hash -d papers=$PROJS/papers
hash -d planet=$SVNROOT/github.jeapostrophe.planet
setopt autopushd pushdminus pushdsilent pushdtohome
autoload -U zmv
export PS1="%S%~%s %# "
TPS1="%~ %# "
RECENTFILES=8
precmd () {print -Pn "\e]0;$TPS1\a"}
preexec () {print -Pn "\e]0;$TPS1 $2\a"}
chpwd () {
# Save what directory we are in for the future
dirs -l >! ~/.zdirs # added -l
# Show recently modified files
ls -t | head -$RECENTFILES | xargs ls -d
}
if [[ -f ~/.zdirs ]] && [[ ${#dirstack[*]} -eq 0 ]]; then
dirstack=( $(< ~/.zdirs) )
popd
fi
c () {
if [ "$1" = "" ] ; then
dirs -v
else
cd ~$1
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment