I have a long winded command. I created a bash function to make it easier to remember.
For example:
phew() {
echo 'This is not really my super long winded command'
}
This is all great. However, I don't want to execute the command yet. I just want phew
to do all the typing for me.
Is there a way to write a string of text to the terminal input?
Adapting the example above:
phew() {
foo "echo 'This is not really my super long winded command'"
}
$ phew # would write the next line for me
$ echo 'This is not really my super long winded command' # Then, I press enter. Producing...
# This is not really my super long winded command