diff --git a/src/files.c b/src/files.c index 9cdbc6bc..a13495db 100644 --- a/src/files.c +++ b/src/files.c @@ -1112,7 +1112,6 @@ void do_insertfile(void) #endif if (func == flip_pipe) { if (answer && answer[0] == '|') { - fprintf(stderr, "First char is a pipe, we should remove it.\n"); char *aux = mallocstrcpy(NULL, &answer[1]); free(answer); answer = aux; diff --git a/src/global.c b/src/global.c index 996aec3b..bd9ce869 100644 --- a/src/global.c +++ b/src/global.c @@ -529,7 +529,7 @@ void shortcut_init(void) const char *readfile_gist = N_("Insert another file into current buffer (or into new buffer)"); const char *pipe_gist = - N_("Pipe current file or selction to external command"); + N_("Pipe the current buffer (or marked region) to the command"); const char *whereis_gist = N_("Search forward for a string or a regular expression"); const char *wherewas_gist = @@ -1032,9 +1032,6 @@ void shortcut_init(void) add_to_funcs(flip_execute, MEXTCMD, readfile_tag, WITHORSANS(readfile_gist), TOGETHER, NOVIEW); - - add_to_funcs(flip_pipe, MEXTCMD, - pipe_tag, WITHORSANS(pipe_gist), TOGETHER, NOVIEW); } #endif /* !NANO_TINY */ #ifdef ENABLE_MULTIBUFFER @@ -1043,6 +1040,9 @@ void shortcut_init(void) add_to_funcs(flip_newbuffer, MINSERTFILE|MEXTCMD, N_("New Buffer"), WITHORSANS(newbuffer_gist), TOGETHER, NOVIEW); #endif + if (!ISSET(RESTRICTED)) + add_to_funcs(flip_pipe, MEXTCMD, + pipe_tag, WITHORSANS(pipe_gist), TOGETHER, NOVIEW); #ifdef ENABLE_BROWSER /* The file browser is only available when not in restricted mode. */ @@ -1340,7 +1340,7 @@ void shortcut_init(void) /* Only when not in restricted mode, allow multiple buffers. */ if (!ISSET(RESTRICTED)) { add_to_sclist(MINSERTFILE|MEXTCMD, "M-F", 0, flip_newbuffer, 0); - add_to_sclist(MEXTCMD, "^\\", 0, flip_pipe, 0); + add_to_sclist(MEXTCMD, "M-\\", 0, flip_pipe, 0); } #endif #ifdef ENABLE_BROWSER