fork/fish-shell

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

Johannes Altmanninger__fish_complete_list: strip "--foo=" prefix from replacing completions320ebb685

master
4.6 KiB73 linesraw
1# Completions for xbps-query
2# Author: Allen Sobot <chilledfrogs@disroot.org>
3
4set -l progname xbps-query
5
6set -l listall "(__fish_print_xbps_packages)"
7set -l listinstalled "(__fish_print_xbps_packages -i)"
8
9function __fish_print_xbps_pkg_props
10    printf 'alternatives\tList of alternatives provided by the package\n'
11    printf 'architecture\tArchitecture of machine\n'
12    printf 'archive-compression-type\tType of archive\'s compression format\n'
13    printf 'automatic-install\tWas the package installed automatically\n'
14    printf 'build-options\tOptions used to build the package\n'
15    printf 'conf_files\tList of provided system configuration files\n'
16    printf 'conflicts\tList of packages the package conflicts with\n'
17    printf 'filename-sha256\tFilename\'s sha256\n'
18    printf 'filename-size\tFilename\'s size\n'
19    printf 'homepage\tHomepage of the package\n'
20    printf 'install-date\tDate the package was installed\n'
21    printf 'install-msg\tMessage printed during installation\n'
22    printf 'install-script\tPrint the package\'s install script\n'
23    printf 'installed_size\tSize of the package\n'
24    printf 'license\tLicense of the package\n'
25    printf 'maintainer\tMaintainer of the package\n'
26    printf 'metafile-sha256\tMetafile\'s sha256\n'
27    printf 'pkgver\tThe package\'s name/version tuple\n'
28    printf 'preserve\tWill files be preserved after update\n'
29    printf 'provides\tList of virtual packages provided by the package\n'
30    printf 'remove-msg\tMessage printed during removal\n'
31    printf 'remove-script\tPrint the package\'s removal script\n'
32    printf 'replaces\tList of packages the package replaces\n'
33    printf 'repository\tRepo where package was downloaded from\n'
34    printf 'run_depends\tList of packages required to run the package\n'
35    printf 'reverts\tList of versions the package reverts\n'
36    printf 'shlib-provides\tList of provided shared libraries\n'
37    printf 'shlib-requires\tList of required shared libraries\n'
38    printf 'short_desc\tShort description of the package\n'
39    printf 'source-revisions\tGit revision used to build the package\n'
40    printf 'state\tState of the package\n'
41end
42
43complete -c $progname -f
44complete -c $progname -a "$listinstalled"
45complete -c $progname -n "__fish_contains_opt -s R" -a "$listall"
46
47complete -c $progname -s C -d 'Use this XBPS configuration directory' -xa "(__fish_complete_directories)"
48complete -c $progname -s c -d 'Use this cache directory to store binary packages' -xa "(__fish_complete_directories)"
49complete -c $progname -s d -d 'Enable extra debugging shown to stderr'
50complete -c $progname -s h -d 'Show the help message'
51complete -c $progname -s i -d 'Ignore repositories defined in configuration files'
52complete -c $progname -s M -d 'For remote repositories, the data is fetched and stored in memory only'
53complete -c $progname -s p -d 'Match one or more package properties' -xa "(__fish_stripprefix='^-\w*p' __fish_complete_list , __fish_print_xbps_pkg_props)"
54complete -c $progname -s R -d 'Enable repository mode'
55complete -c $progname -l repository -d 'Append the specified repository to the top of the list'
56complete -c $progname -l regex -d 'Use Extended Regular Expressions'
57complete -c $progname -l fulldeptree -d 'Print a full dependency tree in the show dependencies mode'
58complete -c $progname -s r -d 'Use this path for the target root directory' -xa "(__fish_complete_directories)"
59complete -c $progname -s v -d 'Enables verbose messages'
60complete -c $progname -s V -d 'Show the version information'
61complete -c $progname -s l -d 'List registered packages in the package database (pkgdb)'
62complete -c $progname -s H -d 'List registered packages in the package database (pkgdb) that are on hold'
63complete -c $progname -s L -d 'List repositories and the number of packages contained on them'
64complete -c $progname -s m -d 'List packages in the package database (pkgdb) that were installed manually'
65complete -c $progname -s O -d 'List package orphans in the package database (pkgdb)'
66complete -c $progname -s o -d 'Search for installed package files by matching PATTERN'
67complete -c $progname -s S -d 'Shows information of an installed package' -x
68complete -c $progname -s s -d 'Search for packages by matching PATTERN on pkgver or short_desc'
69complete -c $progname -s f -d 'Show the package files for PKG' -x
70complete -c $progname -s x -d 'Show the required dependencies for PKG.  Only direct dependencies are shown' -x
71complete -c $progname -s X -d 'Show the reverse dependencies for PKG' -xa "$listinstalled"
72complete -c $progname -s X -d 'Show the reverse dependencies for PKG' -x -n "__fish_contains_opt -s R" -a "$listall"
73complete -c $progname -l cat -d 'Prints the file FILE stored in binary package PKG to stdout' -F