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

Re: print builtin preceded by parameter assignment



For what it's worth, Bash seems to (mostly) agree with the zsh
interpretation.  If I set HISTTIMEFORMAT to something containing %Z
and then run "TZ=UTC history" I get timestamps in the local timezone,
not in UTC.  If I first export TZ=UTC and then run history, I get
timestamps in UTC.

*However*, if I run "HISTTIMEFORMAT='%r ' history" the change takes
place for the builtin and I get the different format.  So it seems to
matter whether the variable itself is "known" to Bash, or something.

In neither case does the assignment persist in the shell after
"history" is done executing.



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