Skip to content

Instantly share code, notes, and snippets.

@jrop
Created October 20, 2016 18:02
Show Gist options
  • Save jrop/264ad0cb8c53015ea628db62c26d2c56 to your computer and use it in GitHub Desktop.
Save jrop/264ad0cb8c53015ea628db62c26d2c56 to your computer and use it in GitHub Desktop.
Command not found
#!/bin/bash
prompt="$(PS1="$PS1" echo -n | bash --norc -i 2>&1)";
while [ true ]; do
echo -n "${prompt%exit}";
read line;
echo "-bash: $line: command not found";
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment