diff --git a/lib/getopts/getopts_long.sh b/lib/getopts/getopts_long.sh index fb78382..261c92d 100644 --- a/lib/getopts/getopts_long.sh +++ b/lib/getopts/getopts_long.sh @@ -84,7 +84,7 @@ in OPTARG_LONG=${OPTARG_LONG#--} ;; (*) - echo "option '--${__optstring%%[:?,]*}' doesn't allow an argument" >&2 + echo "option \`--${__optstring%%[:?,]*}' doesn't allow an argument" >&2 ;; esac : $((OPTIND_LONG+=1)) @@ -122,7 +122,7 @@ in read -r "$2" <<-EOF ? EOF - echo "option '$3' requires an argument" >&2 + echo "option \`$3' requires an argument" >&2 ;; esac @@ -159,7 +159,7 @@ in OPTARG_LONG=${OPTARG_LONG#--} ;; (*) - echo "unrecognized option '$3'" >&2 + echo "unrecognized option \`$3'" >&2 ;; esac diff --git a/spec/getopts/getopts_long.spec b/spec/getopts/getopts_long.spec index 6b0e2ab..0b5f64c 100644 --- a/spec/getopts/getopts_long.spec +++ b/spec/getopts/getopts_long.spec @@ -74,7 +74,7 @@ Describe 'getopts/getopts_long' The status should be success The stdout should equal '' - The stderr should equal 'unrecognized option '\''--illegal'\''' + The stderr should equal 'unrecognized option `--illegal'\''' The variable _opt should equal '?' The variable OPTARG_LONG should be undefined @@ -146,7 +146,7 @@ Describe 'getopts/getopts_long' The status should be success The stdout should equal '' - The stderr should equal 'option '\''--required'\'' requires an argument' + The stderr should equal 'option `--required'\'' requires an argument' The variable _opt should equal '?' The variable OPTARG_LONG should be undefined @@ -233,7 +233,7 @@ Describe 'getopts/getopts_long' The status should be success The stdout should equal '' - The stderr should equal 'option '\''--flag'\'' doesn'\''t allow an argument' + The stderr should equal 'option `--flag'\'' doesn'\''t allow an argument' The variable _opt should equal '?' The variable OPTARG_LONG should be undefined