|
|
|
@ -1,4 +1,4 @@
|
|
|
|
|
#!/usr/bin/env sh |
|
|
|
|
#!/usr/bin/env bash |
|
|
|
|
|
|
|
|
|
# This magical spell captures and processes key presses. |
|
|
|
|
# Use it to capture key presses from the terminal and determine which key was pressed. |
|
|
|
@ -66,7 +66,4 @@ await_keypress() {
|
|
|
|
|
esac |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
# Check if the script is being executed or sourced, if executed then call the function |
|
|
|
|
if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then |
|
|
|
|
await_keypress |
|
|
|
|
fi |
|
|
|
|