Step 8 - Challenge: Command History
In this step your goal is to add a command history to your shell. You want to have the following features:
Save all executed commands to the history.
Save the history to disk when the shell exits (to a file,
.ccsh_history
in the users HOME directory.Reload the history from disk when the shell is started.
Support the built in command:
history
to list the command history.
That might look something like this:
ccsh> ls
Cargo.lock Cargo.toml src target test.txt
ccsh> pwd
/Users/johncrickett/dev/CodingChallengesFYI/challenge-shell/ccsh
ccsh> ls
Cargo.lock Cargo.toml src target test.txt
ccsh> history
ls
pwd
ls
ccsh> exit
ccsh %
Once you’ve got all that working - congratulations, you’ve built your own command line shell!