When trying to invoke a command via 'ptxdist bash cmd [args...]'
If cmd takes an argument that matches one of the option that is parsed in
parse_first in ptxdist, then cmd never gets that argument.

For example,
        ptxdist bash foo -d bar
would get erroneously invoked as:
        foo bar

This commit allows one to overcome this limitation:
        ptxdist bash -- foo -d bar
so that it gets invoked properly as:
        foo -d bar

Signed-off-by: Jon Ringle <[email protected]>
---
 bin/ptxdist |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/bin/ptxdist b/bin/ptxdist
index 3b923d8..7aa7633 100755
--- a/bin/ptxdist
+++ b/bin/ptxdist
@@ -1291,6 +1291,13 @@ parse_first()
                -q|--quiet)
                        PTXDIST_QUIET=1
                        ;;
+               --)
+                       while [ ${#} -ne 0 ]; do
+                               arg="${1}"
+                               shift
+                               
ptxdist_args_second[${#ptxdist_args_seco...@]}]="${arg}"
+                       done
+                       ;;
                *)
                        ptxdist_args_second[${#ptxdist_args_seco...@]}]="${arg}"
                        ;;
-- 
1.7.0.2.182.ge007


-- 
ptxdist mailing list
[email protected]

Reply via email to