Last active
September 25, 2021 12:28
-
-
Save joewiz/ff5a4015e811035e5cdfaf69d47dd7b9 to your computer and use it in GitHub Desktop.
Display all environment variables and their values
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xquery version "3.1"; | |
element environment-variables { | |
for $var in available-environment-variables() | |
order by $var | |
return | |
element environment-variable { | |
attribute name { $var }, | |
attribute value { environment-variable($var) } | |
} | |
}, | |
(: or, a one-liner that returns an map :) | |
map:merge(available-environment-variables() ! map:entry(., environment-variable(.))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment