fish: make getting os-release info local to function

This commit is contained in:
Nico 2026-02-20 01:01:22 +11:00
parent c6c8674a83
commit db83386473
Signed by: nico
SSH key fingerprint: SHA256:XuacYOrGqRxC3jVFjfLROn1CSvLz85Dec6N7O9Gwu/0
2 changed files with 7 additions and 1 deletions

View file

@ -8,7 +8,7 @@ if status is-interactive
# match prompt symbol to OS logo # match prompt symbol to OS logo
if test -e /etc/os-release if test -e /etc/os-release
posix-source /etc/os-release posix-source-local /etc/os-release
end end
if test -e /System if test -e /System

View file

@ -0,0 +1,6 @@
function posix-source-local
for i in (cat $argv)
set arr (echo $i |tr = \n)
set -lx $arr[1] $arr[2]
end
end