how to search command history beginning with what you type
Linux - DesktopThis forum is for the discussion of all Linux Software used in a desktop context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
how to search command history beginning with what you type
in opensuse (from version 10.3 to newest), it supports shift + up/down when typing command in the terminal, which prompts the command history beginning with the typed words. The feature comforts the experience navigating in the command history, but it differs from CTRL +R. I dislike it.
Does it achieved from alias in bashrc? how can it be enabled in ubuntu?
I moved to ubuntu because of driver(wireless) problems, but I'm missing it whenever I type a word in the terminal.
Thanks for your helps.
Updated: How can we search the command history beginning with the typed words in the terminal?
Last edited by xiawinter; 02-16-2010 at 08:41 AM.
Reason: clarify the question.
On my system(KDE/Konsole), "shift + up arrow" moves up one line. "up arrow" alone steps thru the command history. (the latter is the same on all terminals I have ever used.)
Have you tried looking in the preferences for gnome-terminal?
it should be not the tab key, which I use quite a lot to complete the command.
for example, I previously typed a command
Code:
ssh -D 1234 abc@host.com
and while I'm typing ssh in the terminal, the idea comes to my mind that I have ever used a ssh command, so instead of typing -D continually, I type shift +up to recall the full command.
CTRL +r doesn't help when you have words typed in the terminal except repeating typing the search keywords and ctrl r to retrieve from the command history.
I think the feature I'm expecting is something like
Code:
!ssh
but I want the alternatives because the types words are not unique.
Last edited by xiawinter; 02-16-2010 at 09:13 AM.
Reason: with compliment added to describe the real requests.
On my system(KDE/Konsole), "shift + up arrow" moves up one line. "up arrow" alone steps thru the command history. (the latter is the same on all terminals I have ever used.)
Have you tried looking in the preferences for gnome-terminal?
when i login as another user and I press up I don't get my command history, vs when I'm logged in as the "main" user on my system. do you know what configuration I'm missing?
when i login as another user and I press up I don't get my command history..[SNIP].. do you know what configuration I'm missing?
Yes, there is nothing missing.
This is normal behaviour.
history is user-specific. It gives the command history for the current user.
If you log in as another user, you'll get their history, not yours
When you think about it, this is very sensible behaviour.
Welcome to LQ, but in future, please start a new thread when you have a new question, don't "hijack" an established thread (even though it might seem to be related). This just keeps the threads tidy and easier to follow.
to your /etc/inputrc.
With this you can found in your command history a command beginning with what you typped, by using up and down arrows. That the behaviour of Matlab command line.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.