Page 1 of 1

Terminal

Posted: Friday 24th November 2017 4:49pm
by cogier
Using the Gambas Terminal the 'bash' history file is loaded so that pressing the [up arrow] gives you the previously used command. All the commands typed in the Terminal are also remembered. This is what you would expect. However once the Terminal is closed everything typed while it was open is lost. Can anybody tell me where the Gambas Terminal history is held while the Terminal is open.

I have checked this with gb.Terminal (Gambas Farm) it behaves as above. To test it just type something like:-

Code: Select all

echo  Mugabe is gone, great!
Press the [up arrow] and the command is there. Close and re open the Terminal and its gone!

Re: Terminal

Posted: Friday 24th November 2017 8:05pm
by stevedee
cogier wrote: Friday 24th November 2017 4:49pm ...Can anybody tell me where the Gambas Terminal history is held while the Terminal is open...
I suspect its like MS Windows, were it is held in RAM, so not persistent.

Re: Terminal

Posted: Saturday 25th November 2017 3:55pm
by cogier
My friend Matt found the issue. I had copied the gb.Terminal code that used TerminalView.kill to stop the Terminal in the Form_Close() routine. This was added as the TerminalView does not close when the Form is closed.

By setting up a Process pBash As Process the TerminalView will start with pBash = TerminalView1.Exec(["bash"]) and then close the Process cleanly with pBash.close and the .bash_history file will correctly update.

Thanks Matt. :D