This is a very nice explanation. Would you care to submit is as a patch to
doc_src/faq.hdr?
:)
Axel
2008/8/31 Beni Cherniavsky <c...@users.sf.net>
> On Sun, Aug 31, 2008 at 1:29 AM, Philip Ganchev <phil.ganc...@gmail.com>
> wrote:
> > On Sat, Aug 30, 2008 at 3:43 AM, Alex Greif <alex.gr...@gmail.com>
> wrote:
> >> I am completely new to fish and missing the good old history
> >> abbreviations lile !$
> >> Is there a way to simulate this behavior?
> >
> > Press Alt+UpArrow repeatedly until you get the word you need in the
> buffer.
> >
> Expanded explanation:
>
> History substitution was invented before interactive line editing.
> Good interactive history recall is more convenient but requires a
> small change of habits - if you want to modify an old line/word, first
> recall it, then edit. E.g. don't type "sudo !!" - first press Up,
> then Home, then type "sudo ".
>
> Fish history recall is very simple yet effective:
>
> * As in any modern shell, the Up arrow recalls whole lines, starting
> from the last line executed. A single press replaces "!!", later
> presses replace "!-3" and the like.
>
> + If the line you want is far back in the history, type any part of
> the line and then press Up one or more times. This will constrain the
> recall to lines that include this text, and you will get to the line
> you want much faster. This replaces "!vi", "!?bar.c" and the like.
>
> * Alt+Up recalls individual arguments, starting from the last argument
> in the last line executed. A single press replaces "!$", later
> presses replace "!!:4" and the like.
>
> + If the argument you want is far back in history (e.g. 2 lines back
> - that's a lot of words!), type any part of it and then press Alt+Up.
> This will show only arguments containing that part and you will get
> what you want much faster. Try it out, this is very convenient!
>
> If you want to reuse several arguments from the same line ("!!:3*" and
> the like), consider recalling the whole line and removing what you
> don't need (Alt+D and Alt+Backspace are your friends).
>
> http://fishshell.org/user_doc/index.html#editor
>
> --
> Beni Cherniavsky <c...@users.sf.net> (I read email only on weekends)
>
> P.S. unrelatad hint: in , Alt+. (Alt+period) is nearly as useful: it
> recalls the last argument from previous lines ("!$", then "!-2:$",
> "!-3:$" and so on).
>
> -------------------------------------------------------------------------
> 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
> Fish-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/fish-users
>
------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Fish-users mailing list
Fish-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/fish-users