nixpulvis / oursh

Your comrade through the perilous world of UNIX.
http://nixpulvis.com/oursh/oursh
MIT License
67 stars 6 forks source link

History index doesn't reset after a bad command #32

Closed nixpulvis closed 5 years ago

nixpulvis commented 5 years ago

Open oursh, run two successful commands (to get entries in History). Next, press up to increment the history (technically set it to 0) then modifying this command to be invalid. Press enter and then up to see not the last command, but the second to last.

All this is to say, parse error (or other non runtime errors) should not be entered into the history, but still reset the index.