changes in command and caption

Fixed an error where I was overwriting the contents of #command with
#caption. Due to this the command used to disappear from terminal and
only the result remained.