On Sun, Mar 09, 2008 at 10:51:42AM -0400, Jeff Johnson wrote:
> [EMAIL PROTECTED] popt]$ /bin/echo --foo --bar
> --bar
> [EMAIL PROTECTED] popt]$ /bin/echo -- --foo --bar
> --foo --bar

OK, Let's hope that your echo will not drop anything if the first arg
passed to it is a non-option (such as "args:").  If so, the attached
patch should work for everyone (it does for me).

..wayne..
--- test-poptrc 16 Feb 2008 22:16:10 -0000      1.4
+++ test-poptrc 9 Mar 2008 22:15:08 -0000
@@ -7,6 +7,6 @@ test1 alias -O --arg1
 test1 alias --grab --arg2 "'foo !#:+'"
 test1 alias --grabbar --grab bar
 
-test1 exec --echo-args echo --
+test1 exec --echo-args echo args:
 test1 alias -e --echo-args
-test1 exec -a /bin/echo --
+test1 exec -a /bin/echo args:
--- testit.sh   8 Mar 2008 23:11:56 -0000       1.24
+++ testit.sh   9 Mar 2008 22:15:08 -0000
@@ -68,11 +68,11 @@ POSIXLY_CORRECT=1 ; export POSIXLY_CORRE
 run test1 "test1 - 17" "arg1: 1 arg2: (none) rest: foo --arg2 something" 
--arg1 foo --arg2 something
 unset POSIXLY_CORRECT
 run test1 "test1 - 18" "callback: c sampledata bar arg1: 1 arg2: (none)" 
--arg1 --cb bar
-run test1 "test1 - 19" "" --echo-args
-run test1 "test1 - 20" "--arg1" --echo-args --arg1
-run test1 "test1 - 21" "--arg2 something" -T something -e
-run test1 "test1 - 22" "--arg2 something more args" -T something -a more args
-run test1 "test1 - 23" "--echo-args -a" --echo-args -e -a
+run test1 "test1 - 19" "args:" --echo-args
+run test1 "test1 - 20" "args: --arg1" --echo-args --arg1
+run test1 "test1 - 21" "args: --arg2 something" -T something -e
+run test1 "test1 - 22" "args: --arg2 something more args" -T something -a more 
args
+run test1 "test1 - 23" "args: --echo-args -a" --echo-args -e -a
 run test1 "test1 - 24" "arg1: 0 arg2: (none) short: 1" -onedash
 run test1 "test1 - 25" "arg1: 0 arg2: (none) short: 1" --onedash
 run test1 "test1 - 26" "callback: c arg for cb2 foo arg1: 0 arg2: (none)" 
--cb2 foo

Reply via email to