sr6033 / lterm

Online bash terminal(emulator) tutorial. A step by step tutorial for the bash shell.
https://sr6033.github.io/lterm/
GNU General Public License v3.0
56 stars 66 forks source link

History command doesn't work as it should. #29

Open lokeshmohanty opened 6 years ago

lokeshmohanty commented 6 years ago

history command should display all the commands used in the terminal along with the arguments and if a command is used multiple times then the history command is supposed to display that command multiple times in the correct order.

lokeshmohanty commented 6 years ago

It can be solved by making an array and storing the commands every time a command is used.

nvinayvarma189 commented 6 years ago

yes, That is a problem. I contributed to the history command and I did not pay attention to these things. :worried: . On trying to solve this, In the terminal whenever we press the UP ARROW we will be taken to previous command right, If we know how this works, I think the same can be applied to printing the previous commands .

nvinayvarma189 commented 6 years ago

I think adding whatever we type into an array of strings with no fixed space will be the solution

sr6033 commented 6 years ago

@nvinayvarma189 You can check Jquery Terminal Plugin docs for the up arrow feature.