help-bash
[Top][All Lists]
Advanced

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

Re: Passing argument to a function defined with 'bind -x'


From: Chet Ramey
Subject: Re: Passing argument to a function defined with 'bind -x'
Date: Mon, 26 Apr 2021 09:40:21 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.9.1

On 4/23/21 11:38 AM, Jesper Nygårds wrote:
I have a function that I have bound to <alt-a> with 'bind -x'". I would
like to be able to pass some simple argument or state to the called
function, so that it could behave differently depending on this state.

Passing an argument to a function bound with `bind -x' isn't currently
supported. This is because the function that walks the key sequence to
find the correct function in the keymap binding doesn't currently handle
numeric arguments in the sequence.

Chet

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



reply via email to

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