Skip to content

Instantly share code, notes, and snippets.

@chivalry
Last active July 13, 2016 12:02
Show Gist options
  • Save chivalry/d887d5c00c62e1695c4cacf66f984930 to your computer and use it in GitHub Desktop.
Save chivalry/d887d5c00c62e1695c4cacf66f984930 to your computer and use it in GitHub Desktop.
Last login: Wed Jul 13 04:58:33 on ttys001
~ $ cd Library/
Library $ :cd
-bash: :cd: command not found
Library $ tail ~/.bash_profile
}
command_not_found_handle() {
if [[ "${1:0:1}" != : ]]; then
printf "%s: %s: command not found\n" "$0" "$1" >&2
return 127
else
"${1/#:}" "${@:2}"
fi
}
Library $ source ~/.bash_profile
Library $ :cd
-bash: :cd: command not found
Library $
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment