Added functionality to store and re-execute the most recently used commandstring.