about summary refs log tree commit diff
path: root/fish/functions/__xtools_complete_repo_urls.fish
blob: 052d23448857547201bd1f22f8da2db72fe95db8 (plain) (blame)
1
2
3
4
5
6
7
8
9
function __xtools_complete_repo_urls
    if [ -e /usr/share/xmirror/mirrors.lst ]
        string match -vr '^\s*#' </usr/share/xmirror/mirrors.lst | while read -l line
            set -l values (string split \t -- $line)
            # Mirror url, location, and tier
            echo -- $values[2]\t$values[3], Tier $values[4]
        end
    end
end