-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Description
After I made the PR I realized this:
stklos> (define-external readline-parse-and-bind ((line :string)) :entry-name "rl_parse_and_bind" :return-type :int)
stklos> (readline-parse-and-bind "Control-f: \"define\"")
Now when the user hits C-f
readline automatically inserts the word define
😄
It is also possible to not just include text, but do actions like resetting the terminal, etc.
It also works for setting variables, but then one needs to use the command set
:
stklos> (readline-parse-and-bind "set blink-matching-paren off")
stklos> (readline-parse-and-bind "set blink-matching-paren on")
But the PR I made actually hardcoded the set
in readline-set-option
, so one cannot change keybindings... Maybe we should change this?
- Have a generic
readline-config-line!
instead ofreadline-set-option!
? - Keep
readline-set-option!
and includereadline-set-keybinding
? - Keep
readline-set-option!
and include genericreadline-config-line!
? - Keep it as it is?
Metadata
Metadata
Assignees
Labels
No labels