Certainly foo
is listed below:
PS /home/nicholas/chimp>
PS /home/nicholas/chimp> Get-ChildItem env:
Name Value
---- -----
_ /snap/bin/pwsh
CLR_ICU_VERSION_OVERRIDE 60.2
COLORTERM truecolor
DBUS_SESSION_BUS_ADDRESS unix:path=/run/user/1000/bus
DESKTOP_SESSION ubuntu
DISPLAY :1
foo bar
GDMSESSION ubuntu
GJS_DEBUG_OUTPUT stderr
GJS_DEBUG_TOPICS JS ERROR;JS LOG
GNOME_DESKTOP_SESSION_ID this-is-deprecated
GNOME_SHELL_SESSION_MODE ubuntu
GNOME_TERMINAL_SCREEN /org/gnome/Terminal/screen/e541ff8a_1fb3_477b_a685_074b316b8bcc
GNOME_TERMINAL_SERVICE :1.78
GPG_AGENT_INFO /run/user/1000/gnupg/S.gpg-agent:0:1
GRADLE_HOME /home/nicholas/.sdkman/candidates/gradle/current
GTK_MODULES gail:atk-bridge
HOME /home/nicholas
IM_CONFIG_PHASE 1
INVOCATION_ID 8c2492a5c0464f27a979cad923c16937
JAVA_HOME /home/nicholas/.sdkman/candidates/java/current
JOURNAL_STREAM 9:260051
LANG en_US.utf8
LANGUAGE en_CA:en
LC_ALL en_US.UTF-8
LC_CTYPE en_US.UTF-8
LESSCLOSE /usr/bin/lesspipe %s %s
LESSOPEN | /usr/bin/lesspipe %s
LOGNAME nicholas
LS_COLORS rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:s…
MANAGERPID 14143
OLDPWD /home/nicholas
PATH /snap/powershell/149/opt/powershell:/home/nicholas/.sdkman/candidates/java/current/bin:/home/nichol…
POWERSHELL_DISTRIBUTION_CHANN… PSSnap
PSModulePath /home/nicholas/.local/share/powershell/Modules:/usr/local/share/powershell/Modules:/snap/powershell…
PWD /home/nicholas/chimp
QT_ACCESSIBILITY 1
QT_IM_MODULE ibus
SDKMAN_CANDIDATES_API https://api.sdkman.io/2
SDKMAN_CANDIDATES_DIR /home/nicholas/.sdkman/candidates
SDKMAN_DIR /home/nicholas/.sdkman
SDKMAN_PLATFORM Linux64
SDKMAN_VERSION 5.9.1+575
SESSION_MANAGER local/mordor:@/tmp/.ICE-unix/14354,unix/mordor:/tmp/.ICE-unix/14354
SHELL /bin/bash
SHLVL 1
SNAP /snap/powershell/149
SNAP_ARCH amd64
SNAP_COMMON /var/snap/powershell/common
SNAP_CONTEXT q-DbUBQMK4V-sXTO62RcZMXvkKfoVBRGFLw7wD8IiowIRR2JVsv3
SNAP_COOKIE q-DbUBQMK4V-sXTO62RcZMXvkKfoVBRGFLw7wD8IiowIRR2JVsv3
SNAP_DATA /var/snap/powershell/149
SNAP_INSTANCE_KEY
SNAP_INSTANCE_NAME powershell
SNAP_LIBRARY_PATH /var/lib/snapd/lib/gl:/var/lib/snapd/lib/gl32:/var/lib/snapd/void
SNAP_NAME powershell
SNAP_REAL_HOME /home/nicholas
SNAP_REEXEC
SNAP_REVISION 149
SNAP_USER_COMMON /home/nicholas/snap/powershell/common
SNAP_USER_DATA /home/nicholas/snap/powershell/149
SNAP_VERSION 7.1.0
SSH_AGENT_PID 14316
SSH_AUTH_SOCK /run/user/1000/keyring/ssh
TERM xterm-256color
USER nicholas
USERNAME nicholas
VTE_VERSION 6003
WINDOWPATH 4
XAUTHORITY /run/user/1000/gdm/Xauthority
XDG_CONFIG_DIRS /etc/xdg/xdg-ubuntu:/etc/xdg
XDG_CURRENT_DESKTOP ubuntu:GNOME
XDG_DATA_DIRS /usr/share/ubuntu:/home/nicholas/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:…
XDG_MENU_PREFIX gnome-
XDG_RUNTIME_DIR /run/user/1000
XDG_SESSION_CLASS user
XDG_SESSION_DESKTOP ubuntu
XDG_SESSION_TYPE x11
XMODIFIERS @im=ibus
PS /home/nicholas/chimp>
just not sure how to get that specific value:
PS /home/nicholas/chimp>
PS /home/nicholas/chimp> Get-ChildItem Env:foo
Name Value
---- -----
foo bar
PS /home/nicholas/chimp>
PS /home/nicholas/chimp> Get-ChildItem Env:foo -valueOnly
Get-ChildItem: A parameter cannot be found that matches parameter name 'valueOnly'.
PS /home/nicholas/chimp>
not sure why there's no valueOnly:
PS /home/nicholas/chimp>
PS /home/nicholas/chimp> Get-Variable HOME -valueOnly
/home/nicholas
PS /home/nicholas/chimp>
PS /home/nicholas/chimp> Get-Variable env:HOME -valueOnly
Get-Variable: Cannot find a variable with the name 'env:HOME'.
PS /home/nicholas/chimp>
where HOME
has similar behavior.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…