refocus command prompt on execute

fixes #998
closes #1006
@sujitbehera27, I think this is the right level to put this; thanks for the PR!