ladybird/Shell
Shannon Booth d0fb816ac3 Shell: Implement a "cd history" (cdh) builtin
`cdh` with no arguments dumps the last 8 cd calls in history, and
`cdh [index]` can be used to cd to re-run a specific index from that
history. `cdh` itself it a thin wrapper of the `cd` builtin.

There's definitely some improvements that can be made for this command,
but this seems like a good starting point for getting a feel for it and
ideas for changing it in the future.

It's not entirely clear whether we should be storing the resolved path -
or simply just the last argument passed to cd. For now we just use the
last path passed into cd as this seemed like the better option for now.

This means:
 * invalid paths will still be stored in history (potentially useful)
 * cdh's can be repeated for duplicate directory names
 * the history looks a little nicer on the eyes

It might make sense to use resolved paths.

Closes #397
2020-03-09 19:35:36 +01:00
..
GlobalState.h Shell: Implement a "cd history" (cdh) builtin 2020-03-09 19:35:36 +01:00
LineEditor.cpp AK: Make quick_sort() a little more ergonomic 2020-03-03 16:02:58 +01:00
LineEditor.h AK: Make Vector use size_t for its size and capacity 2020-02-25 14:52:35 +01:00
main.cpp Shell: Implement a "cd history" (cdh) builtin 2020-03-09 19:35:36 +01:00
Makefile Build: support library and generator dependencies 2019-12-25 10:11:09 +01:00
Parser.cpp Shell: Allow empty tokens if enclosed in single or double quotes 2020-01-25 12:16:45 +01:00
Parser.h Shell: Allow empty tokens if enclosed in single or double quotes 2020-01-25 12:16:45 +01:00