On Fri, 10 Feb 2017 13:10:20 +0000 (UTC), Thorsten Glaser wrote: > That’s ksh88 where you(r customer) come(s) from?
Our previous products included ksh93. > >> We have the echo you mean in POSIX mode though… > > > >Not sure what you mean here. I see that the echo command behavior is > >changed if Flag(FPOSIX), but I can't seem to be able to set that flag > >(I tried "export POSIX=1" but that doesn't seem to change anything?) > > “set -o posix” ;-) Got it, thanks. > >(...) > >For reference, here is the patch I came up with. The idea is to jump to > >the "echo" command handling code a soon as we see -R. The rest of the > >changes is to remove po.pminusminus as it is no longer needed. Known > > That’s about what I’d have done as well (unless the BSD echo > behaves different from classical echo in which 'print -R -ex' > would be the same as 'print -r -- -ex'; the alternative would > be to parse the -e from -ex and only then output it, turning > it into 'print -- -ex'). This is why some investigation is > likely still needed. I don't think it makes sense to consider one half of a parameter as an option and the other half as a non-option. And definitely not to handle a given letter as an option and then still printing it... "-e" is not necessarily relevant as ksh93's print command doesn't support it in the first place, but I tested "-n": $ print -R -nx -nx $ So it only treats -n as an option if not mixed with unsupported option letters. That is exactly what mksh does for the echo command, and I think we should stick to that for consistency. > If I take your patch, do you wish to have your name added to > the list of copyright holders at the top of the file? No need, this is only a minor contribution. > >caveat: -E would be handled as a valid option, while it was not > > True, but that can be circumvented. Sure it can. My patch was more of a proof-of-concept (one of many, I tried different approaches before) and details can be discussed. Thanks for your time, -- Jean Delvare SUSE L3 Support