mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
Add NOECHOE and TEST_L to the list of SHOPT options (#242)
src/cmd/ksh93/bltins/print.c: - Rename the unlisted and misleadingly named SHOPT_ECHOE option (which disables, not enables, 'echo -e') to SHOPT_NOECHOE. src/cmd/ksh93/SHOPT.sh: - Add the SHOPT_NOECHOE and SHOPT_TEST_L compile time options to the list of SHOPT options. Since there is a probe for TEST_L, set it to probe (empty) by default. NOECHE is off by default. src/cmd/ksh93/features/options: - Small bugfix: Allow SHOPT_TEST_L to be manually enabled on systems that don't support '$(whence -p test) -l /foo'. - Add a comment describing the SHOPT_MULTIBYTE feature test and separate it from the SHOPT_DEVFD test.
This commit is contained in:
parent
f361d6ed3f
commit
4c7c5803bd
3 changed files with 7 additions and 3 deletions
|
|
@ -28,6 +28,8 @@ tst note{ SHOPT_* option probe }end cross{
|
|||
# process substitutions instead of FIFOs, which are not as secure
|
||||
ls /dev/fd/9 9<&0 >/dev/null 2>&1
|
||||
option DEVFD $?
|
||||
|
||||
# test for multibyte support
|
||||
case `echo a | tr a '\012' | wc -l` in
|
||||
*1*) option MULTIBYTE 0 ;;
|
||||
esac
|
||||
|
|
@ -40,7 +42,7 @@ tst note{ SHOPT_* option probe }end cross{
|
|||
# SHOPT_TEST_L so ksh supports it for compatibility with local scripts
|
||||
ln -s /dev/null "$EXECROOT/link$$"
|
||||
env test -l "$EXECROOT/link$$" 2>/dev/null && env test ! -l . 2>/dev/null
|
||||
option TEST_L $?
|
||||
[ $? = 0 ] && option TEST_L 0
|
||||
rm -f "$EXECROOT/link$$"
|
||||
|
||||
# if one of these exists, make SHOPT_SYSRC load /etc/ksh.kshrc by default
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue