diff options
-rwxr-xr-x | wgetpaste | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -360,12 +360,12 @@ convert_to_raw() { # convert groups of short options to singular short options. convert long options to short options. for arg in "${@}"; do - if [[ "${arg}" =~ ^--.*= ]]; then + if [[ "${arg}" == --*=* ]]; then ARGS[${#ARGS[*]}]="${arg%=*}" ARGS[${#ARGS[*]}]="${arg#*=}" - elif [[ "${arg}" =~ ^-- ]]; then + elif [[ "${arg}" == --* ]]; then ARGS[${#ARGS[*]}]="${arg}" - elif [[ "${arg}" =~ ^- ]]; then + elif [[ "${arg}" == -* ]]; then for short_arg in $(echo "${arg#-}" | sed 's|.| -&|g'); do ARGS[${#ARGS[*]}]="${short_arg}" done |