
## FIXME: Only works for zsh and bash
## ___x_cmd_str_split - -- a b c
# ___x_cmd_str_work(){
#     local out=()
#     local sw=0
#     local i
#     for i in "$@"; do
#         sw=$(( sw+1 ))
#         if [ "$i" = "--" ]; then
#             out=( "${@:((sw + 1))}" )
#             set -- "${@:0:sw}"
#             break
#         fi
#     done

#     echo "${#out[@]}" "${out[@]}"
#     echo "$#" "$@"
# }

# ___x_cmd_str_split_to_lines(){
#     local IFS
#     local SEP=${1:?Please provide seperator}
#     shift

#     local sw=0
#     local i
#     local final=-1
#     local out=()
#     for i in "$@"; do
#         sw=$(( sw+1 ))
#         [ "$i" = -- ] && final=$sw
#     done

#     # Strange case ___x_cmd_str_split_to_lines : --
#     if [ "$final" -ne -1 ] && [ "$final" -ne $# ] ; then
#         out=("${@:((final + 1))}")
#         set -- "${@:0:final}"
#     fi

#     if [ ${#out[@]} -eq 0 ]; then
#         ____x_cmd_str_split_to_lines "$SEP" "$1"
#     else
#         local sss=0
#         for i in $(____x_cmd_str_split_to_lines "$SEP" "$1"); do
#             local var=${out[sss]}
#             sss=$(( sss+1 ))
#             [ -z "$var" ] && return 0
#             [ "$var" != "-" ] && eval "$var=$(___x_cmd_str_repr "$i")"
#         done
#     fi
# }