.\" Automatically generated by Pandoc 2.17.1.1 .\" .\" Define V font for inline verbatim, using C font in formats .\" that render this, and otherwise B font. .ie "\f[CB]x\f[]"x" \{\ . ftr V B . ftr VI BI . ftr VB B . ftr VBI BI .\} .el \{\ . ftr V CR . ftr VI CI . ftr VB CB . ftr VBI CBI .\} .TH "elvish-platform" "7" "Feb 25, 2023" "Elvish 0.18.0" "Miscellaneous Information Manual" .hy .PP .SH Introduction .PP The \f[V]platform:\f[R] module provides access to the platform\[cq]s identifying data. .SH Variables .PP .SS $platform:arch {#platform:arch} .PP The architecture of the platform; e.g. amd64, arm, ppc. This corresponds to Go\[cq]s \f[V]GOARCH\f[R] (https://pkg.go.dev/runtime?tab=doc#pkg-constants) constant. This is read-only. .PP .SS $platform:is-unix {#platform:is-unix} .PP Whether or not the platform is UNIX-like. This includes Linux, macOS (Darwin), FreeBSD, NetBSD, and OpenBSD. This can be used to decide, for example, if the \f[V]unix\f[R] module is usable. This is read-only. .PP .SS $platform:is-windows {#platform:is-windows} .PP Whether or not the platform is Microsoft Windows. This is read-only. .PP .SS $platform:os {#platform:os} .PP The name of the operating system; e.g. darwin (macOS), linux, etc. This corresponds to Go\[cq]s \f[V]GOOS\f[R] (https://pkg.go.dev/runtime?tab=doc#pkg-constants) constant. This is read-only. .SH Functions .PP .SS platform:hostname {#platform:hostname} .IP .nf \f[C] platform:hostname &strip-domain=$false \f[R] .fi .PP Outputs the hostname of the system. If the option \f[V]&strip-domain\f[R] is \f[V]$true\f[R], strips the part after the first dot. .PP This function throws an exception if it cannot determine the hostname. It is implemented using Go\[cq]s \f[V]os.Hostname\f[R] (https://golang.org/pkg/os/#Hostname). .PP Examples: .IP .nf \f[C] \[ti]> platform:hostname \[u25B6] lothlorien.elv.sh \[ti]> platform:hostname &strip-domain=$true \[u25B6] lothlorien \f[R] .fi