Menu

#2 Favor history list for completions

open
nobody
None
5
2001-08-19
2001-08-19
Anonymous
No

Maybe this is what the history search feature is for (I
can't figure out how to use the history search feature
- it may be broken), but I would like to see items in
my history appear before other possible completions.
For example, if I type s s Tab, The completation list
is: ssh-add, ssh-agent, ssh-copy-id, ssh-keygen,
ssh-keyscan and ssh. I would like to see items from my
history list such as "ssh annie" and "ssh dinetah"
appear at the top of the completion list, with the most
recent history match first.

Discussion

  • Mihai Bazon

    Mihai Bazon - 2001-08-20

    Logged In: YES
    user_id=158787

    Hmm.. the history search is not broken.. try it again.

    However, this feature would be nice but what if sometimes is
    not desired? Maybe it would be better to add another key
    combination for completion from history.. but that would be
    '!' history search.. I'll just think 'bout it for now.

     
  • Nobody/Anonymous

    Logged In: NO

    The Debian documentation for gmrun does not mention the ! so
    I'll file that as a bug with them. The Ctrl R and Ctrl S
    mechanisms confused me.I took this to mean that I could
    start a search with Ctrl S (a la Emacs), which is not
    actually the case since the search does not wrap around.
    After entering a search with Ctrl S, I could not (easily)
    use Ctrl R to modify the search pattern in the opposite
    direction. Anyway, I got confused.

    Although I like the ! mechanism (since it is familiar from
    CLI shells) I still think that many people repeat the same
    commands frequently, so incorporating history items into the
    Tab completion would be a very natural extension of the
    current behavior. If the history list is ordered from the
    most recently used command to the least recently used (which
    it is), infrequently executed commands will not remain in
    the history list for very long.

    And if a history item is not the desired command, the user
    need only tab to the desired command or continue typing to
    disambiguate the correct choice. I guess history items
    should appear in alphabetical order, not at the top of the
    list as I had suggested. For example, typing s s h Tab would
    yield a completion list like this:

    ssh
    ssh annie
    ssh dinetah
    ssh-add
    ssh-agent
    ssh-copy-id
    ssh-keygen
    ssh-keyscan

    Of course, this would require that gmrun's completion logic
    support spaces.
    Let me know what you think.

    Cheers,
    m

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.