aboutsummaryrefslogtreecommitdiffstats
path: root/etc.c
diff options
context:
space:
mode:
authorFumitoshi UKAI <ukai@debian.or.jp>2003-02-26 17:22:01 +0000
committerFumitoshi UKAI <ukai@debian.or.jp>2003-02-26 17:22:01 +0000
commitaa5056e39a7d44ee3099d17202ad6e6fcc613e34 (patch)
treec2eb43db4ce3247ba5331474a0c99357a324a28b /etc.c
parentfix indent (diff)
downloadw3m-aa5056e39a7d44ee3099d17202ad6e6fcc613e34.tar.gz
w3m-aa5056e39a7d44ee3099d17202ad6e6fcc613e34.zip
[w3m-dev 03783] pipe to "command1 | command2"
* etc.c (myExtCommand): redirect to subshell * main.c (pipeBuf): conv_to_system(cmd) shell_quote() set buf->filename, buf->buffername
Diffstat (limited to '')
-rw-r--r--etc.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/etc.c b/etc.c
index 6bc2b0e..5cad793 100644
--- a/etc.c
+++ b/etc.c
@@ -1,4 +1,4 @@
-/* $Id: etc.c,v 1.66 2003/02/18 15:44:33 ukai Exp $ */
+/* $Id: etc.c,v 1.67 2003/02/26 17:22:02 ukai Exp $ */
#include "fm.h"
#include <pwd.h>
#include "myctype.h"
@@ -1495,8 +1495,12 @@ myExtCommand(char *cmd, char *arg, int redirect)
Strcat_char(tmp, *p);
}
}
- if (!set_arg)
- tmp = Strnew_m_charp(cmd, (redirect ? " < " : " "), arg, NULL);
+ if (!set_arg) {
+ if (redirect)
+ tmp = Strnew_m_charp("(", cmd, ") < ", arg, NULL);
+ else
+ tmp = Strnew_m_charp(cmd, " ", arg, NULL);
+ }
return tmp;
}