share/config: Guard contains against options

Fixes #5662.

[ci skip]
This commit is contained in:
Fabian Homborg 2019-02-14 11:00:47 +01:00
parent 5814b1b8e2
commit 13eb01bc97

View File

@ -178,7 +178,7 @@ if status --is-login
for path_file in $argv[2] $argv[3]/*
if [ -f $path_file ]
while read -l entry
if not contains $entry $result
if not contains -- $entry $result
set -a result $entry
end
end <$path_file
@ -186,7 +186,7 @@ if status --is-login
end
for entry in $$argv[1]
if not contains $entry $result
if not contains -- $entry $result
set result $result $entry
end
end