aboutsummaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/main.c b/main.c
index 9f00e8f..8f00db4 100644
--- a/main.c
+++ b/main.c
@@ -1,4 +1,4 @@
-/* $Id: main.c,v 1.214 2003/02/25 16:06:57 ukai Exp $ */
+/* $Id: main.c,v 1.215 2003/02/26 17:22:03 ukai Exp $ */
#define MAINPROGRAM
#include "fm.h"
#include <signal.h>
@@ -1895,10 +1895,12 @@ pipeBuf(void)
cmd = searchKeyData();
if (cmd == NULL || *cmd == '\0') {
cmd = inputLineHist("Pipe buffer to: ", "", IN_COMMAND, ShellHist);
- if (cmd == NULL || *cmd == '\0') {
- displayBuffer(Currentbuf, B_NORMAL);
- return;
- }
+ }
+ if (cmd != NULL)
+ cmd = conv_to_system(cmd);
+ if (cmd == NULL || *cmd == '\0') {
+ displayBuffer(Currentbuf, B_NORMAL);
+ return;
}
tmpf = tmpfname(TMPF_DFL, NULL)->ptr;
f = fopen(tmpf, "w");
@@ -1908,12 +1910,15 @@ pipeBuf(void)
}
saveBuffer(Currentbuf, f, TRUE);
fclose(f);
- buf = getpipe(myExtCommand(cmd, tmpf, TRUE)->ptr);
+ buf = getpipe(myExtCommand(cmd, shell_quote(tmpf), TRUE)->ptr);
if (buf == NULL) {
disp_message("Execution failed", TRUE);
return;
}
else {
+ buf->filename = cmd;
+ buf->buffername = Sprintf("%s %s", PIPEBUFFERNAME,
+ conv_from_system(cmd))->ptr;
buf->bufferprop |= (BP_INTERNAL | BP_NO_URL);
if (buf->type == NULL)
buf->type = "text/plain";