nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit 7ff82aa5e2cda3bf9440722540c32caa1a846f31
parent fd28e5f36c82bb964276b6fa804411970721ca7c
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Mon, 15 Jun 2020 14:27:49 +0200

rcfile: add bindable function 'execute', for access to "Execute Command"

(This should have been added three weeks ago when ^T was rebound.)

Diffstat:
Mdoc/nano.texi | 4++++
Mdoc/nanorc.5 | 4++++
Msrc/rcfile.c | 2++
3 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/doc/nano.texi b/doc/nano.texi @@ -1284,6 +1284,10 @@ Shows the current cursor position: the line, column, and character positions. @item wordcount Counts the number of words, lines and characters in the current buffer. +@item execute +Prompts for a program to execute. The program's output will be inserted +into the current buffer (or into a new buffer when @kbd{M-F} is toggled). + @item speller Invokes a spell-checking program, either the default @command{hunspell} or GNU @command{spell}, or the one defined by @option{--speller} or diff --git a/doc/nanorc.5 b/doc/nanorc.5 @@ -599,6 +599,10 @@ Shows the current cursor position: the line, column, and character positions. .B wordcount Counts the number of words, lines and characters in the current buffer. .TP +.B execute +Prompts for a program to execute. The program's output will be inserted +into the current buffer (or into a new buffer when \fBM-F\fR is toggled). +.TP .B speller Invokes a spell-checking program, either the default \fBhunspell\fR or GNU \fBspell\fR, or the one defined by \fB\-\-speller\fR or \fBset speller\fR. diff --git a/src/rcfile.c b/src/rcfile.c @@ -256,6 +256,8 @@ keystruct *strtosc(const char *input) else if (!strcmp(input, "paste")) s->func = paste_text; #ifndef NANO_TINY + else if (!strcmp(input, "execute")) + s->func = do_execute; else if (!strcmp(input, "cutrestoffile")) s->func = cut_till_eof; else if (!strcmp(input, "copy"))