Bash – Command to output to current prompt

bashline-editor

Is there any command that will output text to the (next) command prompt?

I would like to write a function, which upon execution, will perform some commands and then "suggest" the next command to be executed.

~/Desktop $ foo
~/Desktop $ some_new_command_which_user_did_not_enter

Best Answer

Try this :

xvkbd -xsendevent -text ls

Check http://homepage3.nifty.com/tsato/xvkbd/