🔧 feat(fish): Set env vars for machine info
Added $OS & $HOST global variables.
This commit is contained in:
parent
315b46ee53
commit
85446f029c
1 changed files with 9 additions and 0 deletions
|
@ -9,6 +9,15 @@ set -Ux XDG_CACHE_HOME "$HOME/.cache"
|
|||
set -Ux XDG_DATA_HOME "$HOME/.local/share"
|
||||
set -Ux XDG_STATE_HOME "$HOME/.local/state"
|
||||
|
||||
# Machine info.
|
||||
set -gx OS "$(uname)"
|
||||
|
||||
if command -v hostnamectl &>/dev/null
|
||||
set -gx HOST "$(hostnamectl --static)"
|
||||
else if command -v scutil &>/dev/null # macOS
|
||||
set -gx HOST "$(scutil --get ComputerName)"
|
||||
end
|
||||
|
||||
# Projects dir.
|
||||
set -gx HACK "$HOME/hackin"
|
||||
|
||||
|
|
Loading…
Reference in a new issue