Konsole command recall

Hello team -
Kernel: 5.15.85-1-MANJARO and DE: Plasma 5.26.4

Regarding Konsole, is there a way to configure it to recall commands? At this time I can arrow-up for commands executed during this session, but not so for earlier Konsole sessions? Can I change that in any of the confuration options or in the documentation?
Thx
rsv869

it’s not so much about “earlier” sessions
but about
still active sessions.

the history does not get updated in between these still running instances

… close Konsole - and start a new instance
the full history should be there

Not sure how KDE behaves in this regard.
But upon logout and login you should have access to the full history.

Hi, and nope, in my case it doesn’t work that way. Within a Konsole session it retains history, but if I close Konsole and start a new instance it is a blank slate.

No history at all?

That seems odd.

I don’t have or use KDE Plasma.

But that would definitely be very unusual.

Perhaps some setting, some configuration option?

I have never seen any terminal just discard the history.

You have to be referring to some kind of saved history that you have to access via the file menu buttons or via the actual file system, cause I’ve use Konsole and a couple of other Terminal emulators and everyone of them when closed and relaunched start clean again.

there is a command - works at least for the bash shell:
history
not sure whether it is the same for zsh, but I think so

That history is available to every subsequent shell/terminal.

The length/depth of it - how many prior commands are kept in that history file is configurable.
it’s defined in ~/.bashrc, I think

for bash, there is that file:
~/.bash_history
where all these commands are listed

open it with any editor, or with less, for example
or just type:
history

I did not change the default setting.
Currently that file, for me, is at 517 lines of previous commands long.

1 Like

Maybe it’s a KDE thing…
I have virtual instance of Mint and when I use Gnome Terminal, issue and command, exit the terminal and restart Terminal I can “arrow up” and there’s the legacy command.

I don’t think so, I’m using KDE and my Konsole history is saved in .bash_history and in my other account where I test out default settings, the history appears to be stored in a file called .histfile

If you are using KDE, (and Konsole as a terminal), you are almost certainly using zsh - not bash.
… unless you consciously changed it (back to) bash

zsh will write it’s command history to ~/.histfile (I think)
it will not use ~/.bash_history
that is for the bash shell

1 Like

Correct, I consciously changed back to bash way back when manjaro switched to zsh (just because that’s what I’m used to), anyway this is why I have an alternate account on my system to test out the default settings.

Anyway in all cases, my history doesn’t disappear. I wonder if @Reid deleted those hidden history files, perhaps even the zsh config files?

I guess it could be some kind of bug that doesn’t affect me, but I wonder if @Reid could make a new user account and checks to see if the history disappears there too.

I’d do the same thing - every time I had KDE in a VM
zsh (the Manjaro flavour of it) just annoys me, with all it’s “helpful” features.
I’m obviously no power user, to whom these features can be really helpful.

It’s zsh…thanks for that tip.
will read up on how to switch to bash…

Every terminal I’ve used retains history, it’s the reason we have .bash_history and .histfile etc. Clearing history is definitely not normal, but you don’t often get normal with KDE or Gnome.

1 Like

OK… so…A bit of error on my part (sorry for adding to the confusion), but I can add some accurate info and context.

Shell=bash. And the .bash_history file exists and has lots of “history”. No issue there.
Up-and down-arrows work for current Konsole session but if closed and reopened, has no memory. Does that sound experience you’d expect?
Thx
Reid

no

But just to be sure we don’t talk past each other:

In KDE (Konsole) this might not mean what it says.
Even if you set your shell to bash
Konsole will still be using zsh - unless you create a new profile.
yes - it’s true (and totally counter intuitive)
The default profile in Konsole is running zsh - no matter what you set your shell to be via chsh.

To actually change - use this small hint:

It refers to tcsh but you get the idea …

1 Like

thanks so much for this… will check it out ASAP.
Reid

Ha !! That’s exactly the right fix.
thx