Skip to content

Instantly share code, notes, and snippets.

@erikbgithub
Created July 29, 2009 14:30
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 erikbgithub/158189 to your computer and use it in GitHub Desktop.
Save erikbgithub/158189 to your computer and use it in GitHub Desktop.
unset PROMPT_COMMAND
function title {
echo -en "\033]2;$1\007"
}
title `ifconfig -a | perl -ne \
'if (m/^\s*inet (?:addr:)?([\d.]+).*?cast/) {print qq($1); exit 0; }'`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment