aboutsummaryrefslogtreecommitdiff
path: root/toys/other/netcat.c
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2015-01-14 13:59:10 -0600
committerRob Landley <rob@landley.net>2015-01-14 13:59:10 -0600
commitf492fccc9cebbfa91083c345b9bb06d283f6fe93 (patch)
tree4f1adf7142d1d1bffb949b8926f32bbc42524d94 /toys/other/netcat.c
parenta2fd3cedb28394bea7c84e4c785a61df8ccc92a9 (diff)
downloadtoybox-f492fccc9cebbfa91083c345b9bb06d283f6fe93.tar.gz
Switch netcat to stop parsing command line at first nonoption argument instead of stopping after -l or -L.
Hyejin Kim tried "toyboxd nc nc -p 1234 -l rm mv ps" (which attempted to run "nc rm mv ps") and "toybox nc -l -p 1234" (which attempted to run "-p 1234") and found the behavior confusing. So make it work like xargs, where all netcat options have to come before the start of any child command.
Diffstat (limited to 'toys/other/netcat.c')
-rw-r--r--toys/other/netcat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/toys/other/netcat.c b/toys/other/netcat.c
index 58f08251..dcb982d4 100644
--- a/toys/other/netcat.c
+++ b/toys/other/netcat.c
@@ -5,7 +5,7 @@
* TODO: udp, ipv6, genericize for telnet/microcom/tail-f
USE_NETCAT(OLDTOY(nc, netcat, TOYFLAG_BIN))
-USE_NETCAT(NEWTOY(netcat, USE_NETCAT_LISTEN("tl^L^")"w#p#s:q#f:", TOYFLAG_BIN))
+USE_NETCAT(NEWTOY(netcat, USE_NETCAT_LISTEN("^tlL")"w#p#s:q#f:", TOYFLAG_BIN))
config NETCAT
bool "netcat"