bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Feature Idea: Enhanced Tab Completion


From: Chris Jones
Subject: Re: Feature Idea: Enhanced Tab Completion
Date: Sat, 21 Mar 2009 14:08:08 -0400
User-agent: Mutt/1.5.13 (2006-08-11)

On Sat, Mar 21, 2009 at 01:01:51PM EDT, Cam Cope wrote:

> I'm sorry if the feature has already been implemented, I haven't heard
> of any way to implement it. This is what I was thinking of: Right now,
> if you run history, it will list out all the recently used commands,
> and then you could run !360 to run that history result. Often I'm
> looking for a specific command that I don't want to retype the options
> for.  Instead of having to do history | grep commandname and then
> !###, just start typing !commandname and hit tab to see history
> entries that start with it.

Maybe it's because I'm used to it.. but <CTRL-R> seems to do pretty much
what you're after and with less effort:

Say, you ran the following command:

$ xset dpms force suspend

To retrieve this command later in the day:

  <CTRL-R> + "sus"      # or other such as "ce s" etc.

Displays:

(reverse-i-search)`sus': xset dpms force suspend

  <CTRL-E>              # or <CTRL-A> etc.

$ xset dpms force suspend
  <Enter>

Naturally, if typing "sus" or other retrieves a different command, you
would have to either type an extra character such as "p" (the search
back in the history is incremental) or issue a second <CTRL-R> but with
a bit of practice, you pretty soon get used to finding short strings
that will hit on the exact command that you are looking for.

Where it works "better" for me than what you suggest is that you don't
have to visually scan an excerpt of the history to locate the command
that you were looking for: Either you find what you're looking for the
first time around or successive <CTRL-R> actions bring back successive
hits one at a time, which I personally think is more efficient.

Sorry for the lenghty explanation, stuff like that can be demo'ed in a
couple of keystrokes but takes for ever to describe in plain English.

CJ


  




reply via email to

[Prev in Thread] Current Thread [Next in Thread]