Xfce Forum

Sub domains
 

You are not logged in.

#1 2019-11-22 12:43:57

chaujohnthan
Member
Registered: 2019-11-11
Posts: 10

how does Terminal 4.4.3 handle history saving?

seems like it is just a wraper around vte.


strace tells me it does interact with _bash_history. wish to know how.

Offline

#2 2019-11-22 15:36:40

CwF
Member
Registered: 2018-01-28
Posts: 305

Re: how does Terminal 4.4.3 handle history saving?

If you want to edit the history, or preload it with commands, simply open .bash_history in a text editor. You can't have any terminals running while you do this, they will lock the file.
In thunar you can type the path and it will open,  so "home/user/.bash_history"

Offline

#3 2019-11-22 23:07:05

chaujohnthan
Member
Registered: 2019-11-11
Posts: 10

Re: how does Terminal 4.4.3 handle history saving?

when there are 2 or more terminals running, history command outputs differ, so each instance of terminal
seemingly has its own storage, be that temporary as it may, i wonder where the files are.

Offline

#4 2019-11-22 23:56:29

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,486

Re: how does Terminal 4.4.3 handle history saving?

They are stored in memory. The issue is that bash will write to the history file when the terminal process exits. If you have multiple terminals running, you won't, by default, see the latest history entries.

To get around this, add:

export PROMPT_COMMAND='history -a'

...to your ~/.bashrc file. This will force bash to write the command to the history file as soon as it completes running.


Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.007 seconds, 7 queries executed - Memory usage: 535.89 KiB (Peak: 544.69 KiB) ]