dreamos82 / DreamOs

A small 32 bit Operating system written from scratch
GNU General Public License v3.0
64 stars 16 forks source link

Shell history enhancement #44

Closed ghost closed 5 years ago

ghost commented 7 years ago
inuyasha82 commented 7 years ago

Couple of comments:

  1. it's not very clear its behaviour. I mean for example from the shell: a. press up - it shows the last command b. press down - it show another command (maybe the first one), i think if i press up and down it should clean the command (at least the first time, but maybe i consder acceptable that if you press up, then down and down again it brings you to the first element of the history).
  2. If enter several commands, then: a. enter for example the command help (or any command of your choice) b. press up and surf to the previous one c. press enter (it means i'm using the last command) d. press up again (it shows me the last command executed, correct) e. press enter f. press up again (the last command should be help, or anyway the command you tiped on step a), but another command shows up (and apparently it isn't either the command typed before the last one).

And what happens if i enter an empty line (didn't checked)? Can you check it please?

ghost commented 7 years ago

With empty line the command isn't saved to history. The buffer is circular, with only 10 slots, we could increase the amount if you want. Understood the problem 2, i work on it.

inuyasha82 commented 7 years ago

Still not working: Enter couple of commands. Then press arrow up and press enter (use last command entered) Next time you press enter you will se the command before the last one.

then as i pointed in my previous comment: if you press up you should scroll up, but if you press down we should at least clear the command from the shell (or scroll down the history, if it is not a big hassle).

ghost commented 7 years ago

To fix the issue it has been needed to remove the feature that didn't save duplicate command in the history stack. I hope this is acceptable for you.