mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-25 01:40:19 -05:00
config: add pipe-command-output key-binding
This commit is contained in:
parent
e9607de5ae
commit
1c70a84fde
5 changed files with 99 additions and 5 deletions
7
input.c
7
input.c
|
|
@ -227,7 +227,8 @@ execute_binding(struct seat *seat, struct terminal *term,
|
|||
break;
|
||||
/* FALLTHROUGH */
|
||||
case BIND_ACTION_PIPE_VIEW:
|
||||
case BIND_ACTION_PIPE_SELECTED: {
|
||||
case BIND_ACTION_PIPE_SELECTED:
|
||||
case BIND_ACTION_PIPE_COMMAND_OUTPUT: {
|
||||
if (binding->aux->type != BINDING_AUX_PIPE)
|
||||
return true;
|
||||
|
||||
|
|
@ -269,6 +270,10 @@ execute_binding(struct seat *seat, struct terminal *term,
|
|||
len = text != NULL ? strlen(text) : 0;
|
||||
break;
|
||||
|
||||
case BIND_ACTION_PIPE_COMMAND_OUTPUT:
|
||||
success = term_command_output_to_text(term, &text, &len);
|
||||
break;
|
||||
|
||||
default:
|
||||
BUG("Unhandled action type");
|
||||
success = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue