You are not logged in.

#1 2011-08-15 17:52:34

Declan
Member
Registered: 2009-02-06
Posts: 91

Terminal troubles?

Hey guys,

Something bugs me about the terminals I use (xterm and urxvt). When I press the up arrow (to get my previous commands), it shows duplicates of them. So, as a little example, when I'm compiling things a bunch of times with 'make', if I press up 10 times, it will show me make 10 times.

On the other hand, gnuplot's history is very clever. Knowing that people often enter the same command repeatedly, they designed it so that it only shows one version of the previous command, even if you entered it 200 times in a row.

Is there any way I can make urxvt's history work like this?

Also, I really like how in xterm I can hold ctrl down and use the arrow keys to move around a command by words, rather than just by letters. But this doesn't work with urxvt. Any idea how I can do this?

Thanks!

Offline

#2 2011-08-15 18:07:09

fsckd
Forum Fellow
Registered: 2009-06-15
Posts: 4,173

Re: Terminal troubles?

History is a feature of the shell, not the terminal. I assume you are using bash. (You can check by entering ps into the commandline.) Lookup HISTCONTROL in Google the forums, the manual page, etc.

As for your second question, I think you can do that by setting keybindings. I've never had to do that so I'll the leave answer to someone who has.

You may want to consider switching to fish. That has by default all the features you mention.


aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies

Offline

#3 2011-08-15 18:29:56

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Terminal troubles?

Offline

#4 2011-08-15 18:31:24

Declan
Member
Registered: 2009-02-06
Posts: 91

Re: Terminal troubles?

fsckd wrote:

History is a feature of the shell, not the terminal. I assume you are using bash. (You can check by entering ps into the commandline.) Lookup HISTCONTROL in Google the forums, the manual page, etc.

As for your second question, I think you can do that by setting keybindings. I've never had to do that so I'll the leave answer to someone who has.

You may want to consider switching to fish. That has by default all the features you mention.

Thanks, I fixed the history thing!

Offline

#5 2011-08-25 15:54:13

Declan
Member
Registered: 2009-02-06
Posts: 91

Re: Terminal troubles?

Another thing: I HATE it when I do a very long command, and then it starts looping over [declan@mymachine ~]$ thing. I'm not sure if that explains it very well. Basically, when I press up to do that long command again, it kind of replaces the prompt with whatever text happens to loop over it.

It's very annoying and extremely ugly. If I do clear, it shows the [declan@mymachine ~]$ thing again, but if I press up to retrieve the long command again, it does the same thing.

How can I change this?? There must be some simple workaround.

Offline

Board footer

Powered by FluxBB