Mercurial > hg > toybox
changeset 1658:e5e3cd5f8779 draft
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.
author | Rob Landley <rob@landley.net> |
---|---|
date | Wed, 14 Jan 2015 13:59:10 -0600 |
parents | 910a958980dc |
children | 4a68c2b7787c |
files | toys/other/netcat.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/toys/other/netcat.c Wed Jan 14 13:54:34 2015 -0600 +++ b/toys/other/netcat.c Wed Jan 14 13:59:10 2015 -0600 @@ -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"