mirror of
https://github.com/IlanCosman/tide.git
synced 2024-12-25 13:06:32 +03:00
Minor edits to detect_os
This commit is contained in:
parent
95a5582f44
commit
edcc4f0e74
@ -15,14 +15,11 @@ function _tide_detect_os
|
|||||||
end
|
end
|
||||||
|
|
||||||
function _tide_detect_os_linux_cases -a file key
|
function _tide_detect_os_linux_cases -a file key
|
||||||
test -f $file || return
|
set -l splitFile (cat $file | string split '=') || return
|
||||||
|
set -l keyIndex (contains --index $key $splitFile) || return
|
||||||
|
set -l value $splitFile[(math $keyIndex + 1)]
|
||||||
|
|
||||||
set -l splitOsRelease (cat $file | string split '=')
|
switch (string trim --chars='"' $value | string lower)
|
||||||
set -l keyIndex (contains --index $key $splitOsRelease) || return
|
|
||||||
set -l value $splitOsRelease[(math $keyIndex + 1)]
|
|
||||||
set -l name (string trim --chars='"' $value | string lower)
|
|
||||||
|
|
||||||
switch $name
|
|
||||||
case alpine
|
case alpine
|
||||||
set -gx _tide_os_icon
|
set -gx _tide_os_icon
|
||||||
case arch
|
case arch
|
||||||
|
Loading…
Reference in New Issue
Block a user