help-bash
[Top][All Lists]
Advanced

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

Re: [Help-bash] How to execute multiple readline commands?


From: Chet Ramey
Subject: Re: [Help-bash] How to execute multiple readline commands?
Date: Sun, 29 Jul 2018 18:30:18 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

On 7/28/18 7:58 AM, Michal Pesa wrote:
> Hello,
> 
> I would like to execute multiple readline commands. For example the
> following macro deleting the line and inserting "goto ":
> 
> "\C-x\C-d": "\C-a\C-kgoto "
> 
> Is it possible to use something like this instead:
> 
> "\C-x\C-d": beginning-of-line kill-line "goto "
> 
> As of now, it seems to me that I have to bind all the commands I would like
> to use and then use them as a macro (unless I want the keystroke to execute
> exactly one command).

There is no way to execute named readline commands except binding them
to a key. If you want more than one command, you will need to use a macro.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    address@hidden    http://tiswww.cwru.edu/~chet/



reply via email to

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