add getopts for exec (unbreaks “exec -- /bin/ls”) and steal -a and -c from ksh93

This commit is contained in:
tg
2015-02-06 10:56:49 +00:00
parent b94b2e363a
commit f6f49a119b
5 changed files with 65 additions and 24 deletions

5
sh.h
View File

@@ -169,9 +169,9 @@
#endif
#ifdef EXTERN
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.709 2015/01/25 15:23:43 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.710 2015/02/06 10:56:48 tg Exp $");
#endif
#define MKSH_VERSION "R50 2015/01/25"
#define MKSH_VERSION "R50 2015/02/06"
/* arithmetic types: C implementation */
#if !HAVE_CAN_INTTYPES
@@ -1237,6 +1237,7 @@ struct block {
/* Values for struct block.flags */
#define BF_DOGETOPTS BIT(0) /* save/restore getopts state */
#define BF_STOPENV BIT(1) /* do not export further */
/*
* Used by ktwalk() and ktnext() routines.