mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
Fix 47 typos in user-facing help and error messages
(cherry picked from commit df9b2ea03efdf82c0eb6bb53ed9b128c1513a299)
This commit is contained in:
parent
9c75314c71
commit
53443bb981
25 changed files with 47 additions and 47 deletions
|
@ -91,7 +91,7 @@ USAGE_LICENSE
|
||||||
"\aoriginal-euid\a.]"
|
"\aoriginal-euid\a.]"
|
||||||
"}"
|
"}"
|
||||||
"[103:p_suid?Specifies a value for SHOPT_P_SUID. Effective uids greater "
|
"[103:p_suid?Specifies a value for SHOPT_P_SUID. Effective uids greater "
|
||||||
"than the non-privileged-uid disable the priveleged mode. The intercepts "
|
"than the non-privileged-uid disable the privileged mode. The intercepts "
|
||||||
"are:]#?[non-privileged-uid:=1]"
|
"are:]#?[non-privileged-uid:=1]"
|
||||||
"{"
|
"{"
|
||||||
"[+SHOPT_P_SUID?The SHOPT_P_SUID macro value is overridden by "
|
"[+SHOPT_P_SUID?The SHOPT_P_SUID macro value is overridden by "
|
||||||
|
|
|
@ -206,7 +206,7 @@ const char sh_set[] =
|
||||||
"invoked with a \b+\b the options will be written in a format "
|
"invoked with a \b+\b the options will be written in a format "
|
||||||
"that can be reinput to the shell to restore the settings. "
|
"that can be reinput to the shell to restore the settings. "
|
||||||
"Options \b-o\b \aname\a can also be specified with \b--\b\aname\a "
|
"Options \b-o\b \aname\a can also be specified with \b--\b\aname\a "
|
||||||
"and \b+o \aname\a can be specifed with \b--no\b\aname\a except that "
|
"and \b+o \aname\a can be specified with \b--no\b\aname\a except that "
|
||||||
"options names beginning with \bno\b are turned on by omitting \bno\b."
|
"options names beginning with \bno\b are turned on by omitting \bno\b."
|
||||||
"This option can be repeated to enable/disable multiple options. "
|
"This option can be repeated to enable/disable multiple options. "
|
||||||
"The value of \aoption\a must be one of the following:]{"
|
"The value of \aoption\a must be one of the following:]{"
|
||||||
|
@ -968,12 +968,12 @@ USAGE_LICENSE
|
||||||
"[+?If \afirst\a is specified and \alast\a is omitted, then \alast\a will "
|
"[+?If \afirst\a is specified and \alast\a is omitted, then \alast\a will "
|
||||||
"default to \afirst\a unless \b-l\b is specified in which case "
|
"default to \afirst\a unless \b-l\b is specified in which case "
|
||||||
"it will default to \b-1\b.]"
|
"it will default to \b-1\b.]"
|
||||||
"[+?If no editor is specified, then the editor specfied by the \bHISTEDIT\b "
|
"[+?If no editor is specified, then the editor specified by the \bHISTEDIT\b "
|
||||||
"variable will be used if set, or the \bFCEDIT\b variable will be "
|
"variable will be used if set, or the \bFCEDIT\b variable will be "
|
||||||
"used if set, otherwise, \bed\b will be used.]"
|
"used if set, otherwise, \bed\b will be used.]"
|
||||||
"[e]:[editor?\aeditor\a specifies the editor to use to edit the history "
|
"[e]:[editor?\aeditor\a specifies the editor to use to edit the history "
|
||||||
"command. A value of \b-\b for \aeditor\a is equivalent to "
|
"command. A value of \b-\b for \aeditor\a is equivalent to "
|
||||||
"specifiying the \b-s\b option.]"
|
"specifying the \b-s\b option.]"
|
||||||
"[l?List the commands rather than editing and reexecuting them.]"
|
"[l?List the commands rather than editing and reexecuting them.]"
|
||||||
"[N]#[num?Start at \anum\a commands back.]"
|
"[N]#[num?Start at \anum\a commands back.]"
|
||||||
"[n?Suppress the command numbers when the commands are listed.]"
|
"[n?Suppress the command numbers when the commands are listed.]"
|
||||||
|
@ -1196,9 +1196,9 @@ USAGE_LICENSE
|
||||||
"[+-?The escape sequence \b\\C[.\b\aname\a\b.]]\b expands to "
|
"[+-?The escape sequence \b\\C[.\b\aname\a\b.]]\b expands to "
|
||||||
"the collating element \aname\a.]"
|
"the collating element \aname\a.]"
|
||||||
"[+-?The escape sequence \b\\x{\b\ahex\a\b}\b expands to the "
|
"[+-?The escape sequence \b\\x{\b\ahex\a\b}\b expands to the "
|
||||||
"character corresponding to the hexidecimal value \ahex\a.]"
|
"character corresponding to the hexadecimal value \ahex\a.]"
|
||||||
"[+-?The escape sequence \b\\u{\b\ahex\a\b}\b expands to the unicode "
|
"[+-?The escape sequence \b\\u{\b\ahex\a\b}\b expands to the unicode "
|
||||||
"character corresponding to the hexidecimal value \ahex\a.]"
|
"character corresponding to the hexadecimal value \ahex\a.]"
|
||||||
"[+-?The format modifier flag \b=\b can be used to center a field to "
|
"[+-?The format modifier flag \b=\b can be used to center a field to "
|
||||||
"a specified width.]"
|
"a specified width.]"
|
||||||
"[+-?The format modifier flag \bL\b can be used with the \bc\b and "
|
"[+-?The format modifier flag \bL\b can be used with the \bc\b and "
|
||||||
|
@ -1383,7 +1383,7 @@ USAGE_LICENSE
|
||||||
"will be set to this value. If there is no file with this pathname, "
|
"will be set to this value. If there is no file with this pathname, "
|
||||||
"and this pathame does not contain a \b/\b, then the \bPATH\b "
|
"and this pathame does not contain a \b/\b, then the \bPATH\b "
|
||||||
"will be searched for an executable with this name. Any remaining "
|
"will be searched for an executable with this name. Any remaining "
|
||||||
"\aarg\as will be used to initialize the positional parmaeters.]"
|
"\aarg\as will be used to initialize the positional parameters.]"
|
||||||
"[+?Any option can use a \b+\b instead of a \b-\b to disable the corresponding "
|
"[+?Any option can use a \b+\b instead of a \b-\b to disable the corresponding "
|
||||||
"option.]"
|
"option.]"
|
||||||
"[c?Read the commands from the first \aarg\a.]"
|
"[c?Read the commands from the first \aarg\a.]"
|
||||||
|
@ -1654,7 +1654,7 @@ USAGE_LICENSE
|
||||||
"[l?Without \b-i\b, sets character mapping to \btolower\b. When used "
|
"[l?Without \b-i\b, sets character mapping to \btolower\b. When used "
|
||||||
"with \b-i\b, \b-E\b, or \b-F\b indicates long variant.]"
|
"with \b-i\b, \b-E\b, or \b-F\b indicates long variant.]"
|
||||||
"[m?Move. The value is the name of a variable whose value will be "
|
"[m?Move. The value is the name of a variable whose value will be "
|
||||||
"moved to \aname\a. The orignal variable will be unset. Cannot be "
|
"moved to \aname\a. The original variable will be unset. Cannot be "
|
||||||
"used with any other options.]"
|
"used with any other options.]"
|
||||||
"[n?Name reference. The value is the name of a variable that \aname\a "
|
"[n?Name reference. The value is the name of a variable that \aname\a "
|
||||||
"references. \aname\a cannot contain a \b.\b. Cannot be use with "
|
"references. \aname\a cannot contain a \b.\b. Cannot be use with "
|
||||||
|
|
|
@ -43,7 +43,7 @@ extern const char bash_pre_rc[];
|
||||||
static char *login_files[4];
|
static char *login_files[4];
|
||||||
|
|
||||||
const char sh_bash1[] =
|
const char sh_bash1[] =
|
||||||
"[B?Enable brace group expansion. This option is only availabe in bash "
|
"[B?Enable brace group expansion. This option is only available in bash "
|
||||||
"compatibility mode. In ksh mode, brace group expansion is always on.]"
|
"compatibility mode. In ksh mode, brace group expansion is always on.]"
|
||||||
"[P?Do not follow symbolic links, use physical directory structure "
|
"[P?Do not follow symbolic links, use physical directory structure "
|
||||||
"instead. Only available in bash compatibility mode.]";
|
"instead. Only available in bash compatibility mode.]";
|
||||||
|
|
|
@ -312,7 +312,7 @@ typeset -ui42 x=50
|
||||||
if [[ $x != 42#18 ]]
|
if [[ $x != 42#18 ]]
|
||||||
then err_exit 'display of unsigned integers in non-decimal bases wrong'
|
then err_exit 'display of unsigned integers in non-decimal bases wrong'
|
||||||
fi
|
fi
|
||||||
$SHELL -c 'i=0;(( ofiles[i] != -1 && (ofiles[i] < mins || mins == -1) ));exit 0' 2> /dev/null || err_exit 'lexical error with arithemtic expression'
|
$SHELL -c 'i=0;(( ofiles[i] != -1 && (ofiles[i] < mins || mins == -1) ));exit 0' 2> /dev/null || err_exit 'lexical error with arithmetic expression'
|
||||||
$SHELL -c '(( +1 == 1))' 2> /dev/null || err_exit 'unary + not working'
|
$SHELL -c '(( +1 == 1))' 2> /dev/null || err_exit 'unary + not working'
|
||||||
typeset -E20 val=123.01234567890
|
typeset -E20 val=123.01234567890
|
||||||
[[ $val == 123.0123456789 ]] || err_exit "rounding error val=$val"
|
[[ $val == 123.0123456789 ]] || err_exit "rounding error val=$val"
|
||||||
|
@ -664,7 +664,7 @@ done
|
||||||
[[ $($SHELL 2> /dev/null -c 'print -- $(( ldexp(1, 4) ))' ) == 16 ]] || err_exit 'function ldexp not implement or not working correctly'
|
[[ $($SHELL 2> /dev/null -c 'print -- $(( ldexp(1, 4) ))' ) == 16 ]] || err_exit 'function ldexp not implement or not working correctly'
|
||||||
|
|
||||||
|
|
||||||
$SHELL 2> /dev/null -c 'str="0x1.df768ed398ee1e01329a130627ae0000p-1";typeset -l -E x;((x=str))' || err_exit '((x=var)) fails for hexfloat with var begining with 0x1.nnn'
|
$SHELL 2> /dev/null -c 'str="0x1.df768ed398ee1e01329a130627ae0000p-1";typeset -l -E x;((x=str))' || err_exit '((x=var)) fails for hexfloat with var beginning with 0x1.nnn'
|
||||||
|
|
||||||
x=(3 6 12)
|
x=(3 6 12)
|
||||||
(( x[2] /= x[0]))
|
(( x[2] /= x[0]))
|
||||||
|
|
|
@ -314,7 +314,7 @@ integer i
|
||||||
for ((i=0; i < 40; i++))
|
for ((i=0; i < 40; i++))
|
||||||
do x[i]=$i
|
do x[i]=$i
|
||||||
done
|
done
|
||||||
[[ ${#x[@]} == 40 ]] || err_exit 'index arrays loosing values'
|
[[ ${#x[@]} == 40 ]] || err_exit 'index arrays losing values'
|
||||||
[[ $( ($SHELL -c 'typeset -A var; (IFS=: ; set -A var a:b:c ;print ${var[@]});:' )2>/dev/null) == 'a b c' ]] || err_exit 'change associative to index failed'
|
[[ $( ($SHELL -c 'typeset -A var; (IFS=: ; set -A var a:b:c ;print ${var[@]});:' )2>/dev/null) == 'a b c' ]] || err_exit 'change associative to index failed'
|
||||||
unset foo
|
unset foo
|
||||||
[[ $(foo=good
|
[[ $(foo=good
|
||||||
|
|
|
@ -163,7 +163,7 @@ done
|
||||||
[[ ${#ar[*]} == 9 ]] || err_exit "\${#ar[*]} is '${#ar[*]}', should be 9"
|
[[ ${#ar[*]} == 9 ]] || err_exit "\${#ar[*]} is '${#ar[*]}', should be 9"
|
||||||
[[ ${ar[4][4]} == 40 ]] || err_exit "ar[4][4] is '${ar[4][4]}', should be 40"
|
[[ ${ar[4][4]} == 40 ]] || err_exit "ar[4][4] is '${ar[4][4]}', should be 40"
|
||||||
|
|
||||||
$SHELL 2> /dev/null -c 'compound c;float -a c.ar;(( c.ar[2][3][3] = 5))' || 'multi-dimensional arrays in arithemtic expressions not working'
|
$SHELL 2> /dev/null -c 'compound c;float -a c.ar;(( c.ar[2][3][3] = 5))' || 'multi-dimensional arrays in arithmetic expressions not working'
|
||||||
|
|
||||||
expected='typeset -a -l -E c.ar=([2]=([3]=([3]=5) ) )'
|
expected='typeset -a -l -E c.ar=([2]=([3]=([3]=5) ) )'
|
||||||
unset c
|
unset c
|
||||||
|
|
|
@ -182,8 +182,8 @@ typeset -b x=$b1
|
||||||
typeset -b -Z5 a=$b1
|
typeset -b -Z5 a=$b1
|
||||||
[[ $(printf "%B" a) == $w1 ]] || err_exit 'typeset -b -Z5 not working'
|
[[ $(printf "%B" a) == $w1 ]] || err_exit 'typeset -b -Z5 not working'
|
||||||
typeset -b q=$x$x
|
typeset -b q=$x$x
|
||||||
[[ $q == $b2 ]] || err_exit 'typeset -b not working with concatination'
|
[[ $q == $b2 ]] || err_exit 'typeset -b not working with concatenation'
|
||||||
[[ $(printf "%B" q) == $t1$t1 ]] || err_exit 'typeset -b concatination not working'
|
[[ $(printf "%B" q) == $t1$t1 ]] || err_exit 'typeset -b concatenation not working'
|
||||||
x+=$b1
|
x+=$b1
|
||||||
[[ $x == $b2 ]] || err_exit 'typeset -b not working with append'
|
[[ $x == $b2 ]] || err_exit 'typeset -b not working with append'
|
||||||
[[ $(printf "%B" x) == $t1$t1 ]] || err_exit 'typeset -b append not working'
|
[[ $(printf "%B" x) == $t1$t1 ]] || err_exit 'typeset -b append not working'
|
||||||
|
|
|
@ -223,7 +223,7 @@ exec 9>& 1
|
||||||
exec 1>&-
|
exec 1>&-
|
||||||
x=$(print hello)
|
x=$(print hello)
|
||||||
if [[ $x != hello ]]
|
if [[ $x != hello ]]
|
||||||
then err_exit "command subsitution with stdout closed failed"
|
then err_exit "command substitution with stdout closed failed"
|
||||||
fi
|
fi
|
||||||
exec >& 9
|
exec >& 9
|
||||||
cd $pwd
|
cd $pwd
|
||||||
|
|
|
@ -525,7 +525,7 @@ $SHELL -c "( sleep 1; kill -ALRM \$\$ ) & sleep $del" 2> /dev/null
|
||||||
exitval=$?
|
exitval=$?
|
||||||
(( sec = SECONDS - sec ))
|
(( sec = SECONDS - sec ))
|
||||||
exec 2>&3-
|
exec 2>&3-
|
||||||
(( exitval )) && err_exit "sleep doesn't exit 0 with ALRM interupt"
|
(( exitval )) && err_exit "sleep doesn't exit 0 with ALRM interrupt"
|
||||||
(( sec > (del - 1) )) || err_exit "ALRM signal causes sleep to terminate prematurely -- expected 3 sec, got $sec"
|
(( sec > (del - 1) )) || err_exit "ALRM signal causes sleep to terminate prematurely -- expected 3 sec, got $sec"
|
||||||
typeset -r z=3
|
typeset -r z=3
|
||||||
y=5
|
y=5
|
||||||
|
|
|
@ -63,7 +63,7 @@ unset x
|
||||||
typeset -A x
|
typeset -A x
|
||||||
x=( [foo]=bar )
|
x=( [foo]=bar )
|
||||||
if [[ ${x[@]} != bar ]]
|
if [[ ${x[@]} != bar ]]
|
||||||
then err_exit 'compound assignemnt of associative arrays not working'
|
then err_exit 'compound assignment of associative arrays not working'
|
||||||
fi
|
fi
|
||||||
unset -n foo x
|
unset -n foo x
|
||||||
unset foo x
|
unset foo x
|
||||||
|
@ -424,7 +424,7 @@ data.samples+=(
|
||||||
|
|
||||||
[[ $data == %(()) ]] || err_exit "unbalanced parenthesis with compound variable containing array of compound variables"
|
[[ $data == %(()) ]] || err_exit "unbalanced parenthesis with compound variable containing array of compound variables"
|
||||||
typeset -C -A hello=( [foo]=bar)
|
typeset -C -A hello=( [foo]=bar)
|
||||||
[[ $(typeset -p hello) == 'typeset -C -A hello=([foo]=bar)' ]] || err_exit 'typeset -A -C with intial assignment not working'
|
[[ $(typeset -p hello) == 'typeset -C -A hello=([foo]=bar)' ]] || err_exit 'typeset -A -C with initial assignment not working'
|
||||||
# this caused a core dump before ksh93t+
|
# this caused a core dump before ksh93t+
|
||||||
[[ $($SHELL -c 'foo=(x=3 y=4);function bar { typeset z=4;: $z;};bar;print ${!foo.@}') == 'foo.x foo.y' ]] 2> /dev/null || err_exit '${!foo.@} after function not working'
|
[[ $($SHELL -c 'foo=(x=3 y=4);function bar { typeset z=4;: $z;};bar;print ${!foo.@}') == 'foo.x foo.y' ]] 2> /dev/null || err_exit '${!foo.@} after function not working'
|
||||||
|
|
||||||
|
@ -536,7 +536,7 @@ compound x=(
|
||||||
integer a=1
|
integer a=1
|
||||||
compound b=cpv1
|
compound b=cpv1
|
||||||
)
|
)
|
||||||
[[ $x == *f=2* ]] || err_exit "The field b containg 'f=2' is missing"
|
[[ $x == *f=2* ]] || err_exit "The field b containing 'f=2' is missing"
|
||||||
|
|
||||||
unset x
|
unset x
|
||||||
compound x=(
|
compound x=(
|
||||||
|
@ -602,12 +602,12 @@ expected=$'(\n\t[0]=(\n\t\ta=1\n\t)\n\t[1]=(\n\t\tb=2\n\t)\n)'
|
||||||
|
|
||||||
compound -a x=( [0]=(a=1) [1]=(b=2) )
|
compound -a x=( [0]=(a=1) [1]=(b=2) )
|
||||||
typeset -m "z=x[1]"
|
typeset -m "z=x[1]"
|
||||||
[[ $(typeset -p z 2>/dev/null) == 'typeset -C z=(b=2)' ]] || err_exit 'typeset -m not working with commpound -a variable'
|
[[ $(typeset -p z 2>/dev/null) == 'typeset -C z=(b=2)' ]] || err_exit 'typeset -m not working with compound -a variable'
|
||||||
|
|
||||||
unset x z
|
unset x z
|
||||||
compound -A x=( [0]=(a=1) [1]=(b=2) )
|
compound -A x=( [0]=(a=1) [1]=(b=2) )
|
||||||
typeset -m "z=x[1]"
|
typeset -m "z=x[1]"
|
||||||
[[ $(typeset -p z 2>/dev/null) == 'typeset -C z=(b=2)' ]] || err_exit 'typeset -m not working with commpound -a variable'
|
[[ $(typeset -p z 2>/dev/null) == 'typeset -C z=(b=2)' ]] || err_exit 'typeset -m not working with compound -a variable'
|
||||||
typeset -m "x[1]=x[0]"
|
typeset -m "x[1]=x[0]"
|
||||||
typeset -m "x[0]=z"
|
typeset -m "x[0]=z"
|
||||||
exp='([0]=(b=2) [1]=(a=1))'
|
exp='([0]=(b=2) [1]=(a=1))'
|
||||||
|
|
|
@ -111,9 +111,9 @@ done
|
||||||
set -- ~(N)/dev/null
|
set -- ~(N)/dev/null
|
||||||
[[ $# == 1 && $1 == /dev/null ]] || err_exit "~(N)/dev/null not matching /dev/null"
|
[[ $# == 1 && $1 == /dev/null ]] || err_exit "~(N)/dev/null not matching /dev/null"
|
||||||
set -- ~(N)/dev/non_existant_file
|
set -- ~(N)/dev/non_existant_file
|
||||||
[[ $# == 0 ]] || err_exit "~(N)/dev/nonexistant not empty"
|
[[ $# == 0 ]] || err_exit "~(N)/dev/nonexistent not empty"
|
||||||
set -- ""~(N)/dev/non_existant_file
|
set -- ""~(N)/dev/non_existant_file
|
||||||
[[ $# == 1 && ! $1 ]] || err_exit '""~(N)/dev/nonexistant not null argument'
|
[[ $# == 1 && ! $1 ]] || err_exit '""~(N)/dev/nonexistent not null argument'
|
||||||
set -- ~(N)/dev/non_existant_file""
|
set -- ~(N)/dev/non_existant_file""
|
||||||
[[ $# == 1 && ! $1 ]] || err_exit '~(N)/dev/nonexistent"" not null argument'
|
[[ $# == 1 && ! $1 ]] || err_exit '~(N)/dev/nonexistent"" not null argument'
|
||||||
for i in ~(N)/dev/non_existent_file
|
for i in ~(N)/dev/non_existent_file
|
||||||
|
|
|
@ -341,7 +341,7 @@ then err_exit "export inside function not working -- expected 'fun', got '$val'"
|
||||||
fi
|
fi
|
||||||
val=$(export | sed -e '/^zzz=/!d' -e 's/^zzz=//')
|
val=$(export | sed -e '/^zzz=/!d' -e 's/^zzz=//')
|
||||||
if [[ $val ]]
|
if [[ $val ]]
|
||||||
then err_exit "unset varaible exported after function call -- expected '', got '$val'"
|
then err_exit "unset variable exported after function call -- expected '', got '$val'"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
unset zzz
|
unset zzz
|
||||||
|
|
|
@ -244,7 +244,7 @@ eval "$(
|
||||||
EOF
|
EOF
|
||||||
} > $script
|
} > $script
|
||||||
chmod +x $script
|
chmod +x $script
|
||||||
[[ $($SHELL $script) == hello ]] 2> /dev/null || err_exit 'heredoc embeded in command substitution fails at buffer boundary'
|
[[ $($SHELL $script) == hello ]] 2> /dev/null || err_exit 'heredoc embedded in command substitution fails at buffer boundary'
|
||||||
|
|
||||||
got=$( cat << EOF
|
got=$( cat << EOF
|
||||||
\
|
\
|
||||||
|
@ -491,7 +491,7 @@ EOF
|
||||||
print EOF
|
print EOF
|
||||||
} > $f
|
} > $f
|
||||||
$SHELL $f > $g
|
$SHELL $f > $g
|
||||||
[[ $(grep meep $g | grep -v foobar) != '' ]] && err_exit 'here-doc loosing $var expansions on boundaries in rare cases'
|
[[ $(grep meep $g | grep -v foobar) != '' ]] && err_exit 'here-doc losing $var expansions on boundaries in rare cases'
|
||||||
|
|
||||||
print foo > $tmp/foofile
|
print foo > $tmp/foofile
|
||||||
x=$( $SHELL 2> /dev/null 'read <<< $(<'"$tmp"'/foofile) 2> /dev/null;print -r "$REPLY"')
|
x=$( $SHELL 2> /dev/null 'read <<< $(<'"$tmp"'/foofile) 2> /dev/null;print -r "$REPLY"')
|
||||||
|
|
|
@ -126,7 +126,7 @@ set foo
|
||||||
nameref bar=$1
|
nameref bar=$1
|
||||||
foo=hello
|
foo=hello
|
||||||
if [[ $bar != hello ]]
|
if [[ $bar != hello ]]
|
||||||
then err_exit 'nameref of positional paramters outside of function not working'
|
then err_exit 'nameref of positional parameters outside of function not working'
|
||||||
fi
|
fi
|
||||||
unset foo bar
|
unset foo bar
|
||||||
bar=123
|
bar=123
|
||||||
|
|
|
@ -95,8 +95,8 @@ false
|
||||||
}
|
}
|
||||||
[[ $(fn) == 'global fn abc' ]] || err_exit 'fn outside namespace should run global function'
|
[[ $(fn) == 'global fn abc' ]] || err_exit 'fn outside namespace should run global function'
|
||||||
[[ $(.x.fn) == 'local fn bar' ]] || err_exit 'namespace function called from global failed'
|
[[ $(.x.fn) == 'local fn bar' ]] || err_exit 'namespace function called from global failed'
|
||||||
[[ ${z[abc]} == qqq ]] || err_exit 'global associative array should not be affected by definiton in namespace'
|
[[ ${z[abc]} == qqq ]] || err_exit 'global associative array should not be affected by definition in namespace'
|
||||||
[[ ${bar.y} == 4 ]] || err_exit 'global compound variable should not be affected by definiton in namespace'
|
[[ ${bar.y} == 4 ]] || err_exit 'global compound variable should not be affected by definition in namespace'
|
||||||
[[ ${bar.z} == '' ]] || err_exit 'global compound variable should not see elements in namespace'
|
[[ ${bar.z} == '' ]] || err_exit 'global compound variable should not see elements in namespace'
|
||||||
[[ $(xfun) == 'xfun global abc' ]] || err_exit 'global function on FPATH failed'
|
[[ $(xfun) == 'xfun global abc' ]] || err_exit 'global function on FPATH failed'
|
||||||
[[ $(run $foo) == 'global prog abc' ]] || err_exit 'global binary on PATH failed'
|
[[ $(run $foo) == 'global prog abc' ]] || err_exit 'global binary on PATH failed'
|
||||||
|
|
|
@ -380,7 +380,7 @@ PATH=$tmp/bin:$tmp/new/bin:$PATH
|
||||||
x=$(whence -p echo 2> /dev/null)
|
x=$(whence -p echo 2> /dev/null)
|
||||||
[[ $x == "$tmp/new/bin/echo" ]] || err_exit 'nonexistant FPATH directory in .paths file causes path search to fail'
|
[[ $x == "$tmp/new/bin/echo" ]] || err_exit 'nonexistant FPATH directory in .paths file causes path search to fail'
|
||||||
|
|
||||||
$SHELL 2> /dev/null <<- \EOF || err_exit 'path search problem with non-existant directories in PATH'
|
$SHELL 2> /dev/null <<- \EOF || err_exit 'path search problem with non-existent directories in PATH'
|
||||||
PATH=/usr/nogood1/bin:/usr/nogood2/bin:/bin:/usr/bin
|
PATH=/usr/nogood1/bin:/usr/nogood2/bin:/bin:/usr/bin
|
||||||
tail /dev/null && tail /dev/null
|
tail /dev/null && tail /dev/null
|
||||||
EOF
|
EOF
|
||||||
|
|
|
@ -301,7 +301,7 @@ fi
|
||||||
###########################################################
|
###########################################################
|
||||||
###########################################################
|
###########################################################
|
||||||
###########################################################
|
###########################################################
|
||||||
print foo) ]] || err_exit "command subsitution with long comments broken"
|
print foo) ]] || err_exit "command substitution with long comments broken"
|
||||||
subject='some/other/words'
|
subject='some/other/words'
|
||||||
re='@(?*)/@(?*)/@(?*)'
|
re='@(?*)/@(?*)/@(?*)'
|
||||||
[[ ${subject/${re}/\3} != words ]] && err_exit 'string replacement with \3 not working'
|
[[ ${subject/${re}/\3} != words ]] && err_exit 'string replacement with \3 not working'
|
||||||
|
|
|
@ -594,7 +594,7 @@ dot=$(cat <<-EOF
|
||||||
EOF
|
EOF
|
||||||
) ) & sleep 1
|
) ) & sleep 1
|
||||||
if kill -0 $! 2> /dev/null
|
if kill -0 $! 2> /dev/null
|
||||||
then err_exit 'command substitution containg here-doc with command substitution fails'
|
then err_exit 'command substitution containing here-doc with command substitution fails'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
printf=$(whence -p printf)
|
printf=$(whence -p printf)
|
||||||
|
|
|
@ -177,10 +177,10 @@ do [[ $(eval print -r -- \"\${xx//:/\\${str:i:1}}\") == "a${str:i:1}b" ]] |
|
||||||
[[ $(eval print -rn -- \"\${xx//:/\'${str:i:1}\'}\") == "a${str:i:1}b" ]] || err_exit "substitution of '${str:i:1}' failed"
|
[[ $(eval print -rn -- \"\${xx//:/\'${str:i:1}\'}\") == "a${str:i:1}b" ]] || err_exit "substitution of '${str:i:1}' failed"
|
||||||
[[ $(eval print -r -- \"\${xx//:/\"${str:i:1}\"}\") == "a${str:i:1}b" ]] || err_exit "substitution of \"${str:i:1}\" failed"
|
[[ $(eval print -r -- \"\${xx//:/\"${str:i:1}\"}\") == "a${str:i:1}b" ]] || err_exit "substitution of \"${str:i:1}\" failed"
|
||||||
done
|
done
|
||||||
[[ ${xx//:/\\n} == 'a\nb' ]] || err_exit "substituion of \\\\n failed"
|
[[ ${xx//:/\\n} == 'a\nb' ]] || err_exit "substitution of \\\\n failed"
|
||||||
[[ ${xx//:/'\n'} == 'a\nb' ]] || err_exit "substituion of '\\n' failed"
|
[[ ${xx//:/'\n'} == 'a\nb' ]] || err_exit "substitution of '\\n' failed"
|
||||||
[[ ${xx//:/"\n"} == 'a\nb' ]] || err_exit "substituion of \"\\n\" failed"
|
[[ ${xx//:/"\n"} == 'a\nb' ]] || err_exit "substitution of \"\\n\" failed"
|
||||||
[[ ${xx//:/$'\n'} == $'a\nb' ]] || err_exit "substituion of \$'\\n' failed"
|
[[ ${xx//:/$'\n'} == $'a\nb' ]] || err_exit "substitution of \$'\\n' failed"
|
||||||
unset foo
|
unset foo
|
||||||
foo=one/two/three
|
foo=one/two/three
|
||||||
if [[ ${foo//'/'/_} != one_two_three ]]
|
if [[ ${foo//'/'/_} != one_two_three ]]
|
||||||
|
@ -495,8 +495,8 @@ x=$'-(-\\"\')\\\'\\"\'-)-'
|
||||||
|
|
||||||
pattern=00
|
pattern=00
|
||||||
var=100
|
var=100
|
||||||
[[ $( print $(( ${var%%00} )) ) == 1 ]] || err_exit "arithmetic with embeddded patterns fails"
|
[[ $( print $(( ${var%%00} )) ) == 1 ]] || err_exit "arithmetic with embedded patterns fails"
|
||||||
[[ $( print $(( ${var%%$pattern} )) ) == 1 ]] || err_exit "arithmetic with embeddded pattern variables fails"
|
[[ $( print $(( ${var%%$pattern} )) ) == 1 ]] || err_exit "arithmetic with embedded pattern variables fails"
|
||||||
if [[ ax == @(a)* ]] && [[ ${.sh.match[1]:0:${#.sh.match[1]}} != a ]]
|
if [[ ax == @(a)* ]] && [[ ${.sh.match[1]:0:${#.sh.match[1]}} != a ]]
|
||||||
then err_exit '${.sh.match[1]:1:${#.sh.match[1]}} not expanding correctly'
|
then err_exit '${.sh.match[1]:1:${#.sh.match[1]}} not expanding correctly'
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -401,7 +401,7 @@ typeset -T olist=(
|
||||||
)
|
)
|
||||||
olist foo
|
olist foo
|
||||||
foo.l[1]=x
|
foo.l[1]=x
|
||||||
[[ ${!foo.l[*]} == *0* ]] && '0-th elment of foo.l should not be set'
|
[[ ${!foo.l[*]} == *0* ]] && '0-th element of foo.l should not be set'
|
||||||
|
|
||||||
typeset -T oset2=( typeset -A foo )
|
typeset -T oset2=( typeset -A foo )
|
||||||
oset2 bar
|
oset2 bar
|
||||||
|
|
|
@ -36,7 +36,7 @@ USAGE_LICENSE
|
||||||
"of changes to make, or an octal number representing the bit "
|
"of changes to make, or an octal number representing the bit "
|
||||||
"pattern for the new permissions.]"
|
"pattern for the new permissions.]"
|
||||||
"[+?Symbolic mode strings consist of one or more comma separated list "
|
"[+?Symbolic mode strings consist of one or more comma separated list "
|
||||||
"of operations that can be perfomed on the mode. Each operation is of "
|
"of operations that can be performed on the mode. Each operation is of "
|
||||||
"the form \auser\a \aop\a \aperm\a where \auser\a is zero or more of "
|
"the form \auser\a \aop\a \aperm\a where \auser\a is zero or more of "
|
||||||
"the following letters:]{"
|
"the following letters:]{"
|
||||||
"[+u?User permission bits.]"
|
"[+u?User permission bits.]"
|
||||||
|
|
|
@ -50,10 +50,10 @@ USAGE_LICENSE
|
||||||
"\anumber\a.]"
|
"\anumber\a.]"
|
||||||
"[n:lines?Copy \alines\a lines from each file.]#[lines:=10]"
|
"[n:lines?Copy \alines\a lines from each file.]#[lines:=10]"
|
||||||
"[c:bytes?Copy \achars\a bytes from each file.]#[chars]"
|
"[c:bytes?Copy \achars\a bytes from each file.]#[chars]"
|
||||||
"[q:quiet|silent?Never ouput filename headers.]"
|
"[q:quiet|silent?Never output filename headers.]"
|
||||||
"[s:skip?Skip \askip\a characters or lines from each file before "
|
"[s:skip?Skip \askip\a characters or lines from each file before "
|
||||||
"copying.]#[skip]"
|
"copying.]#[skip]"
|
||||||
"[v:verbose?Always ouput filename headers.]"
|
"[v:verbose?Always output filename headers.]"
|
||||||
"\n\n"
|
"\n\n"
|
||||||
"[ file ... ]"
|
"[ file ... ]"
|
||||||
"\n\n"
|
"\n\n"
|
||||||
|
|
|
@ -35,7 +35,7 @@ USAGE_LICENSE
|
||||||
"[+*?Lower case to avoid clashes on case ignorant filesystems.]"
|
"[+*?Lower case to avoid clashes on case ignorant filesystems.]"
|
||||||
"[+*?Pseudo-random part to deter denial of service attacks.]"
|
"[+*?Pseudo-random part to deter denial of service attacks.]"
|
||||||
"[+*?Default pseudo-random part (no specific \bX...\b template) "
|
"[+*?Default pseudo-random part (no specific \bX...\b template) "
|
||||||
"formatted to accomodate 8.3 filesystems.]"
|
"formatted to accommodate 8.3 filesystems.]"
|
||||||
"}"
|
"}"
|
||||||
"[+?A consecutive trailing sequence of \bX\b's in \aprefix\a is replaced "
|
"[+?A consecutive trailing sequence of \bX\b's in \aprefix\a is replaced "
|
||||||
"by the pseudo-random part. If there are no \bX\b's then the "
|
"by the pseudo-random part. If there are no \bX\b's then the "
|
||||||
|
|
|
@ -64,7 +64,7 @@ USAGE_LICENSE
|
||||||
"[h!:headers?Output filename headers.]"
|
"[h!:headers?Output filename headers.]"
|
||||||
"[l:lines?Copy units of lines. This is the default.]"
|
"[l:lines?Copy units of lines. This is the default.]"
|
||||||
"[L:log?When a \b--forever\b file times out via \b--timeout\b, verify that "
|
"[L:log?When a \b--forever\b file times out via \b--timeout\b, verify that "
|
||||||
"the curent file has not been renamed and replaced by another file "
|
"the current file has not been renamed and replaced by another file "
|
||||||
"of the same name (a common log file practice) before giving up on "
|
"of the same name (a common log file practice) before giving up on "
|
||||||
"the file.]"
|
"the file.]"
|
||||||
"[q:quiet?Don't output filename headers. For GNU compatibility.]"
|
"[q:quiet?Don't output filename headers. For GNU compatibility.]"
|
||||||
|
@ -86,7 +86,7 @@ USAGE_LICENSE
|
||||||
"[+y?years]"
|
"[+y?years]"
|
||||||
"[+S?scores]"
|
"[+S?scores]"
|
||||||
"}"
|
"}"
|
||||||
"[v:verbose?Always ouput filename headers.]"
|
"[v:verbose?Always output filename headers.]"
|
||||||
|
|
||||||
"\n"
|
"\n"
|
||||||
"\n[file ...]\n"
|
"\n[file ...]\n"
|
||||||
|
|
|
@ -35,7 +35,7 @@ USAGE_LICENSE
|
||||||
" standard output. When options are specified, one or more"
|
" standard output. When options are specified, one or more"
|
||||||
" system characteristics are written to standard output, space"
|
" system characteristics are written to standard output, space"
|
||||||
" separated, on a single line. When more than one option is specified"
|
" separated, on a single line. When more than one option is specified"
|
||||||
" the output is in the order specfied by the \b-A\b option below."
|
" the output is in the order specified by the \b-A\b option below."
|
||||||
" Unsupported option values are listed as \a[option]]\a. If any unknown"
|
" Unsupported option values are listed as \a[option]]\a. If any unknown"
|
||||||
" options are specified then the local \b/usr/bin/uname\b is called.]"
|
" options are specified then the local \b/usr/bin/uname\b is called.]"
|
||||||
"[+?If any \aname\a operands are specified then the \bsysinfo\b(2) values"
|
"[+?If any \aname\a operands are specified then the \bsysinfo\b(2) values"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue