fork/fish-shell

git clone https://git.julia.blue/fork/fish-shell

Johannes AltmanningerMark private functions that don't need localizationa53db7256

master
555 B17 linesraw
1# localization: skip(private)
2function __fish_print_xbps_packages
3    # Caches for 5 minutes
4    type -q -f xbps-query || return 1
5
6    argparse i/installed -- $argv
7    or return 1
8
9    if not set -q _flag_installed
10        # prints: <package name>	Package
11        __fish_cached -t 250 -- "xbps-query -Rs '' | sed 's/^... \\([^ ]*\\)-.* .*/\\1/; s/\$/\\t'Package'/'"
12        return 0
13    else
14        xbps-query -l | sed 's/^.. \([^ ]*\)-.* .*/\1/' # TODO: actually put package versions in tab for locally installed packages
15        return 0
16    end
17end