Testcase for this patch is in the description of this bug (some people
on IRC wondered.)

I’ve not yet committed it. I’ll need to work on this more. But slowly,
the “mystery” unravels.

----

Two more things to consider:

• We have several “word = quote || (!*x.str && (f & DOASNFIELD)) ? IFS_WORD : 
IFS_WS;” in the tree.
  Maybe changing them all to “[…] : IFS_IWS;” as this patch does is sensible?

• Maybe (cf. LP#1381993) DOASNFIELD should be “non-list context”
instead?

-- 
You received this bug notification because you are a member of mksh
Mailing List, which is subscribed to mksh.
Matching subscriptions: mkshlist-to-mksh-bugmail
https://bugs.launchpad.net/bugs/1381965

Title:
  mksh R50d: parser fixes break common “set -u” workaround, take two

Status in The MirBSD Korn Shell:
  Confirmed

Bug description:
  tglase@tglase:~ $ cat x
  list_parts() {
          local regex=${2:-}
          local args=x
          if [ -n "$regex" ]; then
              args="${args} -regex '$regex'"
          fi  
          printf '<%s>\n' $args
  }
  list_parts foo
  tglase@tglase:~ $ bash x
  <x>
  tglase@tglase:~ $ env -i PATH=$PATH mksh x
  typeset -i -U BASHPID
  typeset -i COLUMNS
  typeset EPOCHREALTIME
  typeset -x HOME
  typeset IFS
  typeset -i -U KSHEGID
  typeset -i -U KSHGID
  typeset -i -U KSHUID
  typeset -r KSH_VERSION
  typeset -i LINES
  typeset -i OPTIND
  typeset -x PATH
  typeset -i -U PGRP
  set -A PIPESTATUS
  typeset -i -r -U PIPESTATUS[0]
  typeset -i -U PPID
  typeset PS1
  typeset PS2
  typeset PS3
  typeset PS4
  typeset PWD
  typeset -i -U RANDOM
  typeset -i SECONDS
  typeset -x SHELL
  typeset -i TMOUT
  typeset -i -U USER_ID
  <x>

  Breaks: php5 maintainer scripts

To manage notifications about this bug go to:
https://bugs.launchpad.net/mksh/+bug/1381965/+subscriptions

Reply via email to