Split /etc/{,man}path by colons too

I don't know how /etc/manpath ends up containing lines like
"path1:path2".  But path_helper splits them so we should do too.

4ea11424b8/path_helper/path_helper.c (L149)

Fixes #10684

(cherry picked from commit 95d61ea0fb)
This commit is contained in:
Johannes Altmanninger
2025-01-25 10:39:28 +01:00
committed by Fabian Boehm
parent e767bb623f
commit a94c4e96ab

View File

@@ -166,13 +166,11 @@ if status --is-login
# Populate path according to config files
for path_file in $argv[2] $argv[3]/*
if test -f $path_file
while read -l entry
if not contains -- $entry $result
test -n "$entry"
and set -a result $entry
end
end <$path_file
for entry in (string split : <? $path_file)
if not contains -- $entry $result
test -n "$entry"
and set -a result $entry
end
end
end