1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00
cde/src/cmd/ksh93/data
Martijn Dekker 403e864ac8 Disallow >;word and <>;word for 'redirect' (re: 7b59fb80, 7b82c338)
The >;word and <>;word redirection operators cannot be used with
the 'exec' builtin, but the 'redirect' builtin (which used to be
an alias of 'command exec') permitted them. However, they do not
have the documented effect of the added ';'. So this commit blocks
those operators for 'redirect' as they are blocked for 'exec'.

It also tweaks redirect's error message if a non-redirection
argument is encountered.

src/cmd/ksh93/sh/parse.c: simple():
- Set the lexp->inexec flag for SYSREDIR (redirect) as well as
  SYSEXEC (exec). This flag is checked for in sh_lex() (lex.c) to
  throw a syntax error if one of these two operators is used.

src/cmd/ksh93/sh.1, src/cmd/ksh93/data/builtins.c:
- Documentation tweaks.

src/cmd/ksh93/sh/xec.c, src/cmd/ksh93/bltins/misc.c:
- When 'redirect' gives an 'incorrect syntax' (e_badsyntax) error
  message, include the first word that was found not to be a valid
  redirection. This is simply the first argument, as redirections
  are removed from the arguments list.

src/cmd/ksh93/tests/io.sh:
- Update test to reflect new error message format.
2021-02-07 03:23:56 +00:00
..
aliases.c Reinstate 'r' and 'history' as preset aliases for interactive ksh 2020-09-11 21:35:45 +02:00
builtins.c Disallow >;word and <>;word for 'redirect' (re: 7b59fb80, 7b82c338) 2021-02-07 03:23:56 +00:00
keywords.c Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
lexstates.c Fix ${!} and ${$} throwing syntax error in here-document 2020-09-04 04:54:35 +02:00
limits.c Fix 80 typos in comments 2020-06-12 01:45:12 +02:00
math.tab Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
msg.c typeset: add error msgs for incompatible options; improve usage msg 2021-01-21 09:36:10 +00:00
options.c Remove SHOPT_BASH; keep &> redir operator, '-o posix' option 2020-09-01 06:19:19 +01:00
signals.c data/signals.c: fix empty SIGINT/SIGPIPE messages 2020-09-18 03:22:26 +02:00
strdata.c Version: 2012-08-01-master 2016-01-11 15:54:23 -05:00
testops.c resolve/remove USAGE_LICENSE macros; remove repetitive (c) strings 2021-01-31 11:00:49 +00:00
variables.c Add ${.sh.pid} as an alternative to $BASHPID (#109) 2020-08-07 02:53:25 +01:00