command-not-found: Split os-release' stuff on space

ID_LIKE is defined as a space-separated list and ID can't have spaces.

Fixes it for "openSUSE Tumblewee".
This commit is contained in:
Fabian Homborg 2018-05-01 19:28:37 +02:00
parent 4962244161
commit e02e485cc6

View file

@ -293,7 +293,7 @@ function __fish_config_interactive -d "Initializations that should be performed
set -l os
if test -r /etc/os-release
set os (string match -r '^ID(?:_LIKE)?\s*=.*' < /etc/os-release | \
string replace -r '^ID(?:_LIKE)?\s*=(.*)' '$1' | string trim -c '\'"')
string replace -r '^ID(?:_LIKE)?\s*=(.*)' '$1' | string trim -c '\'"' | string split " ")
end
# First check if we are on OpenSUSE since SUSE's handler has no options