I was gonna ask another question on the fish mailing list, and it made me
remember this one... after thinking about my desired behavior more, I think
the ideal situation would be to have fish do the following:
if there are 2 or less characters being searched for show the items that
match the beginning of the line first
if there are 3 or more characters, use the current default behavior...
in matlab most of the time, what makes the feature great is that you can
enter 1 character, and then hit the up arrow, which is often very fast.
doing this in fish is pretty much useless since 1 character will likely
match most any command.
with 2 characters things are better but you can still get unwanted search
results, and with 3 its somewhat unlikely that you'll get these spurious
useless matches, so doing the full search with 3 characters might make
sense.
thanks!
-=Abe
On Wed, Nov 7, 2007 at 12:45 PM, Abe Bachrach <[EMAIL PROTECTED]> wrote:
> I think that would be useful, however if things get too complicated
> with all the different cases that fish is trying to guess between, it
> could make it feel inconsistent, which would be bad.
>
> My guess is that the easiest solution would be to add an option such
> as alt+up similar to the ctrl+up which is currently used to tokenize
> the search. Ideally this should be easily configurable so people could
> set which their default behavior would be so that I could do the
> matlab style search from the beginning, and chris could use search
> anywhere :-)
>
> I do like the idea of giving higher priority to the commands which
> match at the beginning though, and I definitely think there is some
> room for a smart prioritization of search results such as ranking
> them:
> +add importance for being more recent
> + add importance for matching the beginning of the input
> - subtract importance for having many repeated commands match the same part
> etc...
>
> thanks for the response, and keep me posted! I would love to see this
> feature/option get added to fish! :-)
>
> thanks,
> -=Abe
>
> On Nov 5, 2007 9:32 PM, Martin Bähr <[EMAIL PROTECTED]>
> wrote:
> > On Mon, Nov 05, 2007 at 06:24:27PM -0800, Chris Rebert wrote:
> > > Under your scheme, I'd type "foo" and then hit the up arrow a million
> > > times looking for the line I want, whereas in fish, I just have to
> > > remember one distinguishing *part* of the command, and it'll be
> > > completed by hitting the up arrow.
> >
> > what about making it search the beginning first and and if it fails to
> > find anything then look in the middle?
> > unlikely to have a command that starts with -y or a filename.
> >
> > greetings, martin.
> > --
> > cooperative communication with sTeam - caudium, pike, roxen and
> unix
> > offering: programming, training and administration - anywhere in the
> world
> > --
> > pike programmer working in new zealand open-steam.org|
> webhaven.co.nz
> > unix system- bahai.or.at iaeste.(tuwien.ac
> |or).at
> > administrator (caudium|gotpike).org
> is.schon.org
> > Martin Bähr
> > http://www.iaeste.or.at/~mbaehr/<http://www.iaeste.or.at/%7Embaehr/>
> >
>
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Fish-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fish-users