bug-bash
[Top][All Lists]
Advanced

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

Re: "alt-period" (alt-.) when previous command was backgrounded with &


From: Bob Proulx
Subject: Re: "alt-period" (alt-.) when previous command was backgrounded with &
Date: Mon, 19 Oct 2009 14:52:21 -0600
User-agent: Mutt/1.5.18 (2008-05-17)

Sitaram Chamarty wrote:
> Chet Ramey wrote:
> > Sitaram Chamarty wrote:
> >> When the previous command was backgrounded (say "gvim
> >> filename.c &") and then you try some other command using
> >> Alt-., it expands to "&" and not "filename.c".
> >>
> >> Is this considered a bug?  Or correct behaviour that just
> >> happens to be not useful in this specific case?
> >
> > M-. uses the last word from the previous line.  If that happens to
> > be `&', that's what it uses.
> 
> ok thanks; I suspected as much (that this was working as intended, and
> the situation I brought up was an edge case) but appreciate the
> confirmation.

Certainly yank-last-arg (M-.,M-_) is useful but don't forget about
yank-nth-arg (M-C-y) which yanks the first argument.  Most of the time
that you are doing something like 'edit filename.c &' then you can use
the still quite convenient M-C-y to paste in the filename as the first
argument to the next command.

Bob




reply via email to

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