2021-09-11 01:55:56 +0200, Joerg Schilling via austin-group-l at The Open Group: [...] > So the main problem I see is that the option -r is probably not usable anymore > because ksh's builtin print(1) implements -r for a different purpose. [...]
2001-10-18 15:15:34 +0100, Oliver Kiddle: [...] > I've decided that an option as Peter suggests is the best way to go > here. It'll have to turn reuse off so that we are keeping to POSIX/ksh > which is a slight pity as the opposite would perhaps be better. > > Any good suggestions on the choice of option letter? -r and -R (for > reuse) are both gone but we want to indicate the opposite of that > anyway. > > For the moment, you can use -r but I've not documented that and will > change it later. For ksh compatibility, -r can't be used with -f but > I'll probably suggest that be changed on the shell list. [...] That -r was never meant to stay. It's still undocumented and I don't expect anyone ever used it. I only just found out when digging up that old discussion. Having said that, it's not really incompatible with ksh's print. With -f, -r (for raw; an option you want to use most of the time like for the read utility) is ignored like for many other options, like it was in zsh before that change. $ print -f '%b\n' '\\\\' \\ $ print -rf '%b\n' '\\\\' \\ $ print -f '%s\n' '\\\\' \\\\ $ print -rf '%s\n' '\\\\' \\\\ $ print '\\\\' \\ $ print -r '\\\\' \\\\ In any case, printf and print are separate utilities (only printf standard), they don't have to support the same set of options. -1 (one, not L) may be a better name for it. Or -B <n> to specify the maximum number of batches (passes; -b, -p, -P are already taken with zsh's print). BTW, ksh93's printf / print -f seem to be pretty buggy wherever %x$b is involved at least: $ print -f '%1$s %1$b\n' '\\\\' \\\\ b $ print -f '%1$b %1$s\n' '\\\\' \\ \\ $ printf '%1$b %1$s\n' '\\\\' \\ \\ $ printf '%1$s %1$b\n' '\\\\' \\\\ b -- Stephane
