Xfce Forum

Sub domains
 

You are not logged in.

#1 2020-09-16 03:31:02

julian
Member
Registered: 2020-09-07
Posts: 31

(SOLVED) Terminal history repeats same command entered multiple times

In my experience, entering the same terminal command multiple times in succession will not result in that same command being added to the history multiple times. It will only be added once.

This doesn't seem to be the case for xfce4-terminal. Why is that? Was it a conscious choice to remove this for some reason?

It feels strange to press Up Arrow in the terminal, only to get the same command. I need to hold Up Arrow key for a while to get the older commands and would prefer the behavior in the first paragraph..

Last edited by julian (2020-09-16 12:06:31)


PGP: 4198 58E4 F9E8 AC05 FDEA A303 F083 6D52 5A2D 8356

Find my email where you get good encryption keys.

Offline

#2 2020-09-16 10:27:08

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

Re: (SOLVED) Terminal history repeats same command entered multiple times

Not really an xfce4-terminal thing, but a bash thing. Add:

export HISTCONTROL=ignoredups

...to (usually) ~/.bashrc.


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

#3 2020-09-16 12:14:34

julian
Member
Registered: 2020-09-07
Posts: 31

Re: (SOLVED) Terminal history repeats same command entered multiple times

That's the ticket, yes. big_smile

Marked as SOLVED

So the other OS has added this Bash line rather than it being removed by Xfce? Wondering if this can be a default for Xfce moving forward... or is this a distro thing?


PGP: 4198 58E4 F9E8 AC05 FDEA A303 F083 6D52 5A2D 8356

Find my email where you get good encryption keys.

Offline

#4 2020-09-16 16:09:58

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

Re: (SOLVED) Terminal history repeats same command entered multiple times

I would say it should be a distro thing, or user choice.


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

#5 2020-09-16 16:30:15

MrEen
Member
Registered: 2019-04-19
Posts: 295

Re: (SOLVED) Terminal history repeats same command entered multiple times

In my older Mint install, I have this in my .bashrc that accomplishes the same thing:

# don't put duplicate lines or lines starting with space in the history.
# See bash(1) for more options
HISTCONTROL=ignoreboth

In this case, it was part of the install, not something I added. (I'm pretty sure.)

Offline

#6 2020-09-16 17:39:27

julian
Member
Registered: 2020-09-07
Posts: 31

Re: (SOLVED) Terminal history repeats same command entered multiple times

ToZ wrote:

I would say it should be a distro thing(...)

Thanks ToZ, is anyone from Manjoro on these forums? I'm racking up improvements and would rather talk to a dev on these forums.

Thanks for your extra info, MrEen.


PGP: 4198 58E4 F9E8 AC05 FDEA A303 F083 6D52 5A2D 8356

Find my email where you get good encryption keys.

Offline

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

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.010 seconds, 8 queries executed - Memory usage: 535.02 KiB (Peak: 535.87 KiB) ]