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

Re: 'export -p' lacks POSIX output



On Oct 22,  5:02am, Martijn Dekker wrote:
} Subject: 'export -p' lacks POSIX output
}
} The command 'export -p' always outputs 'typeset' commands. If
} POSIXBUILTINS is active, it should output 'export' commands.

Would anyone object if this just happened all the time, rather than
depending on POSIXBUILTINS + "export"?

The decision of what command name to print is buried way down in the
depths of hash table scanning callbacks, which although it could test
for POSIXBUILTINS, has no knowledge of the original command name used
to invoke the scan.  (This is a bugaboo for the zsh/param/private
module, so I'm pretty intimately familiar with it at this point.)

More explicitly,

    typeset -x foo=bar
    typeset -p foo

would print

    export foo=bar

even if POSIXBUILTINS were not set.



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