This forum has been archived. All content is frozen. Please use KDE Discuss instead.

[SOLVED] Konsole enhancement (Matlab search)

1

Votes
1
0
Tags: None
(comma "," separated)
gubu1353
Registered Member
Posts
10
Karma
0
Up to now, whith the up and down keys one can navigate between already typed commands. Imagine, I want to execute the command of 10 days before, for example:

[font=Courier]mount -o loop /path/to/image /path/to/mountpoint[/font]

In Matlab this is easy even when one has executed a lot of commands since then. One just has to begin to type the command and can then use the up/down keys to search the previous typed command which matches the already typed letters. For example when I didn't use the mount command since then but hundreds of others I just have to press

[font=Courier]mou[/font] and then the up key to get to my command of 10 days before.
flo
Registered Member
Posts
22
Karma
0
OS
gubu1353 wrote:Up to now, whith the up and down keys one can navigate between already typed commands. Imagine, I want to execute the command of 10 days before, for example:

[font=Courier]mount -o loop /path/to/image /path/to/mountpoint[/font]

In Matlab this is easy even when one has executed a lot of commands since then. One just has to begin to type the command and can then use the up/down keys to search the previous typed command which matches the already typed letters. For example when I didn't use the mount command since then but hundreds of others I just have to press

[font=Courier]mou[/font] and then the up key to get to my command of 10 days before.

this is not a konsole feature, but a bash/zsh one. And I'm pretty sure you can configure them for that. You can start by using ctrl-r to start a backwards search. But your specific request is _very_ likely possibly by configuring bash/zsh/...

Edit: looked it up:
try to add the following lines to your ~/.inputrc:
"e[A": history-search-backward ## up-arrow
"e[B": history-search-forward ## down-arrow

Last edited by flo on Mon Mar 30, 2009 1:27 pm, edited 1 time in total.
gubu1353
Registered Member
Posts
10
Karma
0
flo wrote:
gubu1353 wrote:Up to now, whith the up and down keys one can navigate between already typed commands. Imagine, I want to execute the command of 10 days before, for example:

[font=Courier]mount -o loop /path/to/image /path/to/mountpoint[/font]

In Matlab this is easy even when one has executed a lot of commands since then. One just has to begin to type the command and can then use the up/down keys to search the previous typed command which matches the already typed letters. For example when I didn't use the mount command since then but hundreds of others I just have to press

[font=Courier]mou[/font] and then the up key to get to my command of 10 days before.

this is not a konsole feature, but a bash/zsh one. And I'm pretty sure you can configure them for that. You can start by using ctrl-r to start a backwards search. But your specific request is _very_ likely possibly by configuring bash/zsh/...

Edit: looked it up:
try to add the following lines to your ~/.inputrc:
"e[A": history-search-backward ## up-arrow
"e[B": history-search-forward ## down-arrow


Thank you very much flo, this improves my modest work with bash considerably. I realized that this feature is already implemented using the page up/down keys.
So this thread can be marked already implemented.
User avatar
Primoz
Moderator
Posts
859
Karma
1
OS
I thought it has something to do with bash.
Moved to already implemented!


Primoz, proud to be a member of KDE forums since 2008-Nov.


Bookmarks



Who is online

Registered users: Bing [Bot], gfielding, Google [Bot], Sogou [Bot]