1
1

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

(This should have been added three weeks ago when ^T was rebound.)
Этот коммит содержится в:
Benno Schulenberg 2020-06-15 14:27:49 +02:00
родитель fd28e5f36c
Коммит 7ff82aa5e2
3 изменённых файлов: 10 добавлений и 0 удалений

Просмотреть файл

@ -1284,6 +1284,10 @@ Shows the current cursor position: the line, column, and character positions.
@item wordcount @item wordcount
Counts the number of words, lines and characters in the current buffer. 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 @item speller
Invokes a spell-checking program, either the default @command{hunspell} Invokes a spell-checking program, either the default @command{hunspell}
or GNU @command{spell}, or the one defined by @option{--speller} or or GNU @command{spell}, or the one defined by @option{--speller} or

Просмотреть файл

@ -599,6 +599,10 @@ Shows the current cursor position: the line, column, and character positions.
.B wordcount .B wordcount
Counts the number of words, lines and characters in the current buffer. Counts the number of words, lines and characters in the current buffer.
.TP .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 .B speller
Invokes a spell-checking program, either the default \fBhunspell\fR or GNU 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. \fBspell\fR, or the one defined by \fB\-\-speller\fR or \fBset speller\fR.

Просмотреть файл

@ -256,6 +256,8 @@ keystruct *strtosc(const char *input)
else if (!strcmp(input, "paste")) else if (!strcmp(input, "paste"))
s->func = paste_text; s->func = paste_text;
#ifndef NANO_TINY #ifndef NANO_TINY
else if (!strcmp(input, "execute"))
s->func = do_execute;
else if (!strcmp(input, "cutrestoffile")) else if (!strcmp(input, "cutrestoffile"))
s->func = cut_till_eof; s->func = cut_till_eof;
else if (!strcmp(input, "copy")) else if (!strcmp(input, "copy"))