lterm icon indicating copy to clipboard operation
lterm copied to clipboard

History command doesn't work as it should.

Open lokeshmohanty opened this issue 7 years ago • 4 comments

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 avatar Dec 16 '17 11:12 lokeshmohanty

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

lokeshmohanty avatar Dec 16 '17 11:12 lokeshmohanty

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 avatar Dec 17 '17 11:12 nvinayvarma189

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

nvinayvarma189 avatar Dec 17 '17 11:12 nvinayvarma189

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

sr6033 avatar Dec 17 '17 18:12 sr6033