Skip to content

Instantly share code, notes, and snippets.


Eric Dorsey ericdorsey

View GitHub Profile
# put this in your .bash_profile
if [ $ITERM_SESSION_ID ]; then
export PROMPT_COMMAND='echo -ne "\033];${PWD##*/}\007"; ':"$PROMPT_COMMAND";
# Piece-by-Piece Explanation:
# the if condition makes sure we only screw with $PROMPT_COMMAND if we're in an iTerm environment
# iTerm happens to give each session a unique $ITERM_SESSION_ID we can use, $ITERM_PROFILE is an option too
# the $PROMPT_COMMAND environment variable is executed every time a command is run
# see:
View hubottest
#!/usr/bin/expect -f
# usage: ./hubottest "hubot help"
spawn bin/
sleep 3
expect "Hubot>"
send "hubot [lrange $argv 0 10]\n"
expect eo