help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: What I'm missing when using M-x shell


From: Chris F.A. Johnson
Subject: Re: What I'm missing when using M-x shell
Date: Sun, 14 Sep 2008 20:27:41 +0000
User-agent: slrn/0.9.8.1 (Linux)

On 2008-09-14, Francis Moreau wrote:
> On Sun, Sep 14, 2008 at 8:33 PM, Chris F.A. Johnson
><cfajohnson@gmail.com> wrote:
>> On 2008-09-14, Francis Moreau wrote:
>>> On Sun, Sep 14, 2008 at 12:43 AM, Chris F.A. Johnson
>>><cfajohnson@gmail.com> wrote:
>>>> On 2008-09-12, Francis Moreau wrote:
>>>> ...
>>>>>   4/ There's no readline "yank-last-arg" function which inserts the last
>>>>>       argument to the previous commands
>>>>
>>>>   C-up
>>>>
>>>
>>> really ?
>>>
>>> could you tell me on which function this is binded ?
>>
>>        <C-up> runs the command comint-previous-input
>>
>
> no this paste the whole command line, I'm asking for the last _argument_

(defun last-arg () "" (interactive)
  (comint-previous-input 1)
  (search-backward " ")
  (kill-line)
  (comint-next-input 2)
  (yank)
)


-- 
   Chris F.A. Johnson, webmaster         <http://Woodbine-Gerrard.com>
   ===================================================================
   Author:
   Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)


reply via email to

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