diff --git a/doc/nano.texi b/doc/nano.texi index cadfa92a..d805ce81 100644 --- 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 index f938796b..a5da62fc 100644 --- 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 index 109e9a16..387b0149 100644 --- 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"))