Skip to content

Instantly share code, notes, and snippets.

@joewiz
Last active September 25, 2021 12:28
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joewiz/ff5a4015e811035e5cdfaf69d47dd7b9 to your computer and use it in GitHub Desktop.
Save joewiz/ff5a4015e811035e5cdfaf69d47dd7b9 to your computer and use it in GitHub Desktop.
Display all environment variables and their values
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