Terminal

Post

Posted
Rating:
#1 (In Topic #144)
Avatar
Guru
cogier is in the usergroup ‘Guru’
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

echo  Mugabe is gone, great!

Press the [up arrow] and the command is there. Close and re open the Terminal and its gone!
Online now: No Back to the top

Post

Posted
Rating:
#2
Avatar
Regular
stevedee is in the usergroup ‘Regular’

cogier said

…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.
Online now: No Back to the top

Post

Posted
Rating:
#3
Avatar
Guru
cogier is in the usergroup ‘Guru’
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
Online now: No Back to the top
1 guest and 0 members have just viewed this.