# shellcheck shell=bash
# Using awk for it if posix
case "$___X_CMD_SHELL" in
    bash|zsh)
___x_cmd_jo_quote_(){
    x_="${1//$'\\'/\\}"
    x_="${x_//$'\n'/\\n}"
    x_="${x_//$'\r'/\\n}"
    x_="${x_//$'\t'/\\t}"
    x_="${x_//$'\b'/\\b}"
    x_="${x_//\"/\\\"}"
    x_="\"$x_\""
}

___x_cmd_jo_unquote_(){
    x_="${1#\"}"
    x_="${x_%\"}"
    x_="${x_//\\/$'\\'}"
    x_="${x_//\\n/$'\n'}"
    x_="${x_//\\n/$'\r'}"
    x_="${x_//\\t/$'\t'}"
    x_="${x_//\\b/$'\b'}"
    x_="${x_//\\\"/\"}"
}
    ;;
    *)
___x_cmd_jo_quote_(){
    x_="$( v="$1" ___x_cmd cawk -f "$___X_CMD_ROOT_MOD/jo/lib/cawk/quote.awk" )"
}

___x_cmd_jo_unquote_(){
    x_="$( v="$1" ___x_cmd cawk -f "$___X_CMD_ROOT_MOD/jo/lib/cawk/unquote.awk" )"
}
;;
esac
