NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

ksh and brace expansion



Hello,
in rc/bin/ksh/config.h it's defined POSIXLY_CORRECT,
disabling brace expansion, as noticed in main.c:

        /* Turn on brace expansion by default.  At&t ksh's that have
         * alternation always have it on.  BUT, posix doesn't have
         * brace expansion, so set this before setting up FPOSIX
         * (change_flag() clears FBRACEEXPAND when FPOSIX is set).
         */
#ifdef BRACE_EXPAND
        Flag(FBRACEEXPAND) = 1;
#endif /* BRACE_EXPAND */

I don't know if this is on purpose, but if this is the case you
have to change ksh(1) where it is assumed that alternation is
available.

In my opinion, let sh be a posix shell, let ksh be a korn shell.
I don't really like those fancy features, but people get confused
when they expect some common behaivour that has beeen altered and
the documentation doesn't reflect it. Just an advise.

Regards,
adr.


Home | Main Index | Thread Index | Old Index