Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Bug (?) with ${(M)NAME:+WORD} and ${(P)NAME}



This works:

() {
  local foo
  () {
    print ${(Mt)foo:#*local*}
    print ${${(Mt)foo:#*local*}:+LOCAL}
  }
}

This does not:

() {
  local foo
  () {
    print ${(MtP)1:#*local*}
    print ${${(MtP)1:#*local*}:+LOCAL}
  } foo
}

No alternate nesting of (M) and (P) gives the expected result from :+

The (t) there is not the issue, the same thing happens with:

() {
  local foo=xx-local-xx
  () {
    print ${(MP)1:#*local*}
    print ${${(MP)1:#*local*}:+LOCAL}
  } foo
}

Am I missing something?




Messages sorted by: Reverse Date, Date, Thread, Author