Thank you for that. It is good to know that the ctrl+f if available as it
is much easier to use than the right arrow.

It seems that the behaviour I'm after can be achieved by commenting out
these lines:


https://github.com/fish-shell/fish-shell/blob/6c8518dd1099cfec72f9a6861d2cc3cb831d479b/src/reader.cpp#L3678-L3683

Which means the first time you press history-search-backwards it
autocompletes the suggestion (which is the first entry in the history after
all) and then the second time it goes to the second entry in the history
and so on. I can't argue that this should be exposed as an option really
but at some levels it feels like very reasonable behaviour. The
history-search-backwards should show you the first entry in the history
just like it shows you the others. I guess the presence of the fish
suggestion makes the current behaviour seem like a very reasonable choice
as well.

This is really just me being a creature of habit and for the small things
I'd rather bend fish to my habits than retrain myself. For all the other
excellent things that fish does I'm very happy to learn!

I've only just made this change minutes ago so I've no idea if it might
have undesirable side effects in other situations.

Thanks for the help!
Michael


On 11 December 2015 at 16:08, Peter Flood <i...@whywouldwe.com> wrote:

> Not sure if this will help or not. If you type 'vim' the command you use
> most that start with vim is offered (greyed out), you can press ctrl+f to
> complete it and enter to run it, if instead you press up or ctrl+p the most
> recent command starting with 'vim' is completed, pressing up/ctrl+p again
> will complete the second most recent command etc etc.
>
> I think there's also a way to scroll through the most common commands
> (greyed out) but I don't know how to do that.
>
>
> On 11/12/2015 15:51, Michael Jones wrote:
>
> Thanks for the response. If I press shift + tab then I get a kind of
> search dialogue (which looks great!) for various possible commands but
> related to what's on the system rather than what is in my history. I am
> sorry if wasn't clear, I was hoping to learn how to navigate my command
> history in a manner which feels consistent whether I'm going for the last
> command I ran or one before that.
>
> My issue at the moment is that it feels like it is a different key to get
> to & run the last command versus getting to & running the second to last
> command.
>
> Thanks again,
> Michael
>
> On 8 December 2015 at 23:14, Jônatas Davi Paganini <jonata...@gmail.com>
> wrote:
>
>> Hi Michael! Have you tried shift + tab then tab again?
>>
>> On Tue, Dec 8, 2015 at 7:47 PM, Michael Jones < <m.pricejo...@gmail.com>
>> m.pricejo...@gmail.com> wrote:
>>
>>> Hi,
>>>
>>> I'm new to fish shell and generally loving it. A great experience so far.
>>>
>>> I have one behaviour I'd like to continue from my zsh setup which is
>>> searching the history. On zsh, if I type the start of a command like 'vim'
>>> then it doesn't suggest anything immediately but if I do a
>>> history-search-backward style key press then it completes to the last
>>> command I ran that started with 'vim' and I can press 'enter' to run it or
>>> repeat the history-search thingy to find the command before that, etc.
>>>
>>> So it is the same pattern for the last command or the one before it,
>>> just more key presses.
>>>
>>> With fish, if I type 'vim' then it ghosts in the last command I ran that
>>> starts with 'vim' and if I click history-search-backward thingy then I get
>>> the second to last command. So if I want to run the last command, I
>>> currently have to press 'right arrow' to complete the ghosting then enter
>>> and if I want the second to last then I have to press
>>> history-search-backward and then press enter. This small difference is
>>> throwing me off and I'd like to emulate the behaviour I had with zsh.
>>>
>>> Is that possible? I've had a little look at some of the fish scripts and
>>> the use of the 'commandline' command but I can't see how I would achieve
>>> the results I'm after. Any help would be much appreciated!
>>>
>>> Thanks,
>>> Michael
>>>
>>>
>>> ------------------------------------------------------------------------------
>>>
>>> _______________________________________________
>>> Fish-users mailing list
>>> Fish-users@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/fish-users
>>>
>>>
>>
>>
>> --
>> atenciosamente,
>>
>> Jônatas Davi Paganini.
>> --
>> *ideia.me <http://ideia.me> *| *invent.to <http://invent.to/>*
>>
>>
>
>
> ------------------------------------------------------------------------------
>
>
>
> _______________________________________________
> Fish-users mailing 
> listFish-users@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/fish-users
>
>
>
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> Fish-users mailing list
> Fish-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/fish-users
>
>
------------------------------------------------------------------------------
_______________________________________________
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to