Skip to content

Instantly share code, notes, and snippets.

@hitode909
Created December 16, 2009 04:11
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 hitode909/257580 to your computer and use it in GitHub Desktop.
Save hitode909/257580 to your computer and use it in GitHub Desktop.
function command_not_found_handler() {
new=`echo $* | ruby -pe 'sub(/[A-Z]/){" "+$&.downcase}'`
if [ "$*" != "$new" ]; then
echo "=> $new"
eval $new
return 0
fi
return 127
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment