Created
December 19, 2019 15:49
-
-
Save Ryan1729/09c10aca8246ae34fcd43f8aa00e7233 to your computer and use it in GitHub Desktop.
prompt-to-run script that allows editing command before executing.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# example usage: | |
# $ prompt-to-run 'echo hi' | |
prompt_acc='' | |
read -p 'run `'"$1"'` | |
' -i "$1" -e prompt_acc | |
eval "$prompt_acc" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment