I observe some inconsistency with print -s that I don't understand.
In one case a call of

    x=ABC ; print -s Hihi *.txt $x

will put unexpanded _literal_ 'Hihi *.txt $x' into the command
history, another time it will put an expanded *.txt file name list
and an expanded $x variable value into the command history.

(Using a ksh -l instance seems to expand arguments with print -s
but I haven't done extensive testing, yet not more than necessary
to observe that there's an inconsistent behaviour occasionally.)

Consistency with other commands would probably suggest that the
expanded form is to prefer, though given that print is a built-in
there's the option to support the - IMO more general - non-expanded
form. (What does POSIX say?)

My questions are:
* Is it intended behaviour or is that inconsistency just a bug?
* What shell configuration forces all expansions or prevents them?
* Would you think it makes sense to introduce -S in addition to -s
  to print, where one would expand arguments and one would not?

Currently tested on ksh Version JM 93u 2011-02-08

Thanks!
                                          
_______________________________________________
ast-users mailing list
[email protected]
http://lists.research.att.com/mailman/listinfo/ast-users

Reply via email to