Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [MAYBE SOLVED] passing modified parameter list to child



On Jul 3, 12:23pm, Ronald Fischer wrote:
}
} if [[ ${@[-1]:--} != -* ]] # If last argument is present, but does not
} start with a dash
} then
}    argv[-1]=--use=${@[-1]}
} fi
} slave "$@"

To cover the case of no arguments at all, here's a tweak to the answer
I posted yesterday:

    setopt extendedglob
    (( $# )) && argv[-1]="${argv[-1]/(#s)(#b)([^-])/--use=$match[1]}"
    slave "$@"



Messages sorted by: Reverse Date, Date, Thread, Author