How to echo (a (executable-)string)
to the prompt to make the cursor sit at the end of the line?
So that I can hit Enter to execute or Ctrl-C to throw away the line.
Is this possible at all?
I know an (interactive) bash-script would probably be nicer, but I'd like to keep it simple.
Example:
echo_to_prompt "rm -R ./tmp/logs/delete_me_every_once_in_a_while/"
would result in:
user@machine:~$ rm -R ./tmp/logs/delete_me_every_once_in_a_while/[CURSOR]