I guess I don't quite understand how to write commands for eshell. I am using the form:
(defun eshell/command ()" " (interactive) (insert "command") (eshell-send-input))
When I do this it prints the command and then the prompt, even though the command has not finished executing. I can force the printing of the prompt after I send the commands, but this happens immediately as well, not after the command has completed.
I would like to see some visual indication that the command has finished. I kind of assume there is an eshell elisp function that will wait for the command to finish (like
wait in bash) so I can force the prompt, but I can't find it. Generally is seems you may want to wait for the command to finish before returning from the function. It seems like this would be a common problem. Can someone point me to the obvious which I am not seeing? Thanks.