2018-03-24 02:42:30 +08:00
|
|
|
# TODO unused
|
|
|
|
function __fish_equery_print_format
|
2019-05-05 18:53:09 +08:00
|
|
|
printf "%s\t%s\n" \
|
|
|
|
'$cp' "Category and package name (e.g 'app-portage/gentoolkit')" \
|
|
|
|
'$cpv' "Category, package name and version (e.g. 'app-portage/gentoolkit-0.3.0_rc10-r1')" \
|
|
|
|
'$category' "Category (e.g. 'app-portage')" \
|
|
|
|
'$name' "Package name (e.g. 'gentoolkit')" \
|
|
|
|
'$version' "Version (without the revision) (e.g. '0.3.0_rc10')" \
|
|
|
|
'$revision' "Revision (e.g. 'r1')" \
|
|
|
|
'$fullversion' "Version including revision (e.g. '0.3.0_rc10-r1')" \
|
2020-03-10 02:36:12 +08:00
|
|
|
'$slot' Slot \
|
2019-05-05 18:53:09 +08:00
|
|
|
'$repo' "Repository (e.g. 'gentoo')" \
|
|
|
|
'$mask' "Mask-status field (~M-??)" \
|
|
|
|
'$mask2' "Verbose description of the masking status" \
|
|
|
|
'$location' "Location field (IPO-)"
|
2006-11-08 05:17:08 +08:00
|
|
|
end
|
|
|
|
|
2018-03-24 02:42:30 +08:00
|
|
|
## Global Opts
|
2019-05-05 18:53:09 +08:00
|
|
|
complete -c equery -s h -l help -d "Displays a help message"
|
|
|
|
complete -c equery -s q -l quiet -d "Minimal output"
|
|
|
|
complete -c equery -s C -l no-color -d "Turns off colors"
|
|
|
|
complete -c equery -s N -l no-pipe -d "Turns off pipe detection"
|
|
|
|
complete -c equery -s V -l version -d "Display version information"
|
2018-03-24 02:42:30 +08:00
|
|
|
|
|
|
|
## Subcommands
|
2020-03-10 02:36:12 +08:00
|
|
|
complete -c equery -n __fish_use_subcommand -xa belongs -d "List all pkgs owning file(s)"
|
|
|
|
complete -c equery -n __fish_use_subcommand -xa changes -d "List changelog entries for ATOM"
|
|
|
|
complete -c equery -n __fish_use_subcommand -xa check -d "Check pkg's MD5sums and timestamps"
|
|
|
|
complete -c equery -n __fish_use_subcommand -xa depends -d "List all pkgs depending on specified pkg"
|
|
|
|
complete -c equery -n __fish_use_subcommand -xa depgraph -d "Display pkg's dependency tree"
|
|
|
|
complete -c equery -n __fish_use_subcommand -xa files -d "List files owned by pkg"
|
|
|
|
complete -c equery -n __fish_use_subcommand -xa has -d "List pkgs for matching ENVIRONMENT data"
|
|
|
|
complete -c equery -n __fish_use_subcommand -xa hasuse -d "List pkgs with specified useflag"
|
|
|
|
complete -c equery -n __fish_use_subcommand -xa keywords -d "Display pkg's keywords"
|
|
|
|
complete -c equery -n __fish_use_subcommand -xa list -d "List all pkgs matching pattern"
|
|
|
|
complete -c equery -n __fish_use_subcommand -xa meta -d "Display pkg's metadata"
|
|
|
|
complete -c equery -n __fish_use_subcommand -xa size -d "Print size of files contained in pkg"
|
|
|
|
complete -c equery -n __fish_use_subcommand -xa uses -d "Display pkg's USE flags"
|
|
|
|
complete -c equery -n __fish_use_subcommand -xa which -d "Print full path to ebuild for pkg"
|
2018-03-24 02:42:30 +08:00
|
|
|
|
|
|
|
## Arguments
|
2018-04-16 00:12:36 +08:00
|
|
|
complete -c equery -n '__fish_seen_subcommand_from c changes d depends g depgraph y keywords m meta u uses w which' \
|
2020-01-22 22:17:37 +08:00
|
|
|
-xa '(__fish_print_portage_available_pkgs)'
|
2018-04-15 22:17:11 +08:00
|
|
|
complete -c equery -n '__fish_seen_subcommand_from k check f files s size' \
|
2020-01-22 22:17:37 +08:00
|
|
|
-xa '(__fish_print_portage_installed_pkgs)'
|
2018-03-24 02:42:30 +08:00
|
|
|
|
|
|
|
## Local opts
|
|
|
|
# belongs
|
2019-05-05 18:53:09 +08:00
|
|
|
complete -c equery -n '__fish_seen_subcommand_from b belongs' -s f -l full-regex -d "Query is a regex"
|
|
|
|
complete -c equery -n '__fish_seen_subcommand_from b belongs' -s e -l early-out -d "Stop after first match"
|
|
|
|
complete -c equery -n '__fish_seen_subcommand_from b belongs' -s n -l name-only -d "Omit version"
|
2006-11-08 05:17:08 +08:00
|
|
|
|
2018-03-24 02:42:30 +08:00
|
|
|
# changes
|
2019-05-05 18:53:09 +08:00
|
|
|
complete -c equery -n '__fish_seen_subcommand_from c changes' -s l -l latest -d "Display only latest ChangeLog entry"
|
|
|
|
complete -c equery -n '__fish_seen_subcommand_from c changes' -s f -l full -d "Display full ChangeLog"
|
|
|
|
complete -c equery -n '__fish_seen_subcommand_from c changes' -l limit -d "Limit number of entries displayed (with --full)" \
|
|
|
|
-xa "(seq 99)"
|
2018-04-06 18:10:44 +08:00
|
|
|
#complete -c equery -n '__fish_seen_subcommand_from c changes' -l from=VER -d "Set which version to display from"
|
|
|
|
#complete -c equery -n '__fish_seen_subcommand_from c changes' -l to=VER -d "Set which version to display to"
|
2006-11-08 05:17:08 +08:00
|
|
|
|
2018-03-24 02:42:30 +08:00
|
|
|
# check
|
2019-05-05 18:53:09 +08:00
|
|
|
complete -c equery -n '__fish_seen_subcommand_from k check' -s f -l full-regex -d "Query is a regex"
|
|
|
|
complete -c equery -n '__fish_seen_subcommand_from k check' -s o -l only-failures -d "Only display pkgs that do not pass"
|
2006-11-08 05:17:08 +08:00
|
|
|
|
|
|
|
# depends
|
2019-05-05 18:53:09 +08:00
|
|
|
complete -c equery -n '__fish_seen_subcommand_from d depends' -s a -l all-packages -d "Include dependencies that are not installed (slow)"
|
|
|
|
complete -c equery -n '__fish_seen_subcommand_from d depends' -s D -l indirect -d "Search both direct and indirect dependencies"
|
|
|
|
complete -c equery -n '__fish_seen_subcommand_from d depends' -l depth -d "Limit indirect dependency tree to specified depth" \
|
|
|
|
-xa "(seq 9)"
|
2006-11-08 05:17:08 +08:00
|
|
|
|
|
|
|
# depgraph
|
2019-05-05 18:53:09 +08:00
|
|
|
complete -c equery -n '__fish_seen_subcommand_from g depgraph' -s A -l no-atom -d "Don't show dependency atom"
|
|
|
|
complete -c equery -n '__fish_seen_subcommand_from g depgraph' -s M -l no-mask -d "Don't show masking status"
|
|
|
|
complete -c equery -n '__fish_seen_subcommand_from g depgraph' -s U -l no-useflags -d "Don't show USE flags"
|
|
|
|
complete -c equery -n '__fish_seen_subcommand_from g depgraph' -s l -l linear -d "Don't indent dependencies"
|
|
|
|
complete -c equery -n '__fish_seen_subcommand_from g depgraph' -l depth -d "Limit dependency graph to specified depth" \
|
|
|
|
-xa "(seq 9)"
|
2006-11-08 05:17:08 +08:00
|
|
|
|
|
|
|
# files
|
2018-04-16 00:14:17 +08:00
|
|
|
function __fish_equery_files_filter_args
|
2019-05-05 18:53:09 +08:00
|
|
|
printf "%s\n" dir obj sym dev fifo path conf cmd doc man info
|
2018-04-16 00:14:17 +08:00
|
|
|
end
|
2019-05-05 18:53:09 +08:00
|
|
|
complete -c equery -n '__fish_seen_subcommand_from f files' -s m -l md5sum -d "Include MD5 sum in output"
|
|
|
|
complete -c equery -n '__fish_seen_subcommand_from f files' -s s -l timestamp -d "Include timestamp in output"
|
|
|
|
complete -c equery -n '__fish_seen_subcommand_from f files' -s t -l type -d "Include file type in output"
|
|
|
|
complete -c equery -n '__fish_seen_subcommand_from f files' -l tree -d "Display results in a tree"
|
|
|
|
complete -c equery -n '__fish_seen_subcommand_from f files' -s f -l filter -d "Filter output by file type" \
|
|
|
|
-xa "(__fish_complete_list , __fish_equery_files_filter_args)"
|
2018-03-24 02:42:30 +08:00
|
|
|
|
|
|
|
# has + hasuse
|
2018-04-06 18:10:44 +08:00
|
|
|
complete -c equery -n '__fish_seen_subcommand_from a has h hasuse' -s I -l exclude-installed -d "Exclude installed pkgs from search path"
|
2019-05-05 18:53:09 +08:00
|
|
|
complete -c equery -n '__fish_seen_subcommand_from a has h hasuse' -s o -l overlay-tree -d "Include overlays in search path"
|
|
|
|
complete -c equery -n '__fish_seen_subcommand_from a has h hasuse' -s p -l portage-tree -d "Include entire portage tree in search path"
|
2018-04-06 18:10:44 +08:00
|
|
|
#complete -c equery -n '__fish_seen_subcommand_from a has h hasuse' -s F -l format=TMPL -d "Specify a custom output format"
|
2018-03-24 02:42:30 +08:00
|
|
|
|
|
|
|
# keywords
|
|
|
|
# TODO
|
2006-11-08 05:17:08 +08:00
|
|
|
|
|
|
|
# list
|
2019-05-05 18:53:09 +08:00
|
|
|
complete -c equery -n '__fish_seen_subcommand_from l list' -s d -l duplicates -d "List only installed duplicate pkgs"
|
|
|
|
complete -c equery -n '__fish_seen_subcommand_from l list' -s b -l binpkgs-missing -d "List only installed pkgs without a corresponding binary pkg"
|
|
|
|
complete -c equery -n '__fish_seen_subcommand_from l list' -s f -l full-regex -d "Query is a regex"
|
|
|
|
complete -c equery -n '__fish_seen_subcommand_from l list' -s m -l mask-reason -d "Include reason for pkg mask"
|
2018-04-06 18:10:44 +08:00
|
|
|
complete -c equery -n '__fish_seen_subcommand_from l list' -s I -l exclude-installed -d "Exclude installed pkgs from output"
|
2019-05-05 18:53:09 +08:00
|
|
|
complete -c equery -n '__fish_seen_subcommand_from l list' -s o -l overlay-tree -d "List pkgs in overlays"
|
|
|
|
complete -c equery -n '__fish_seen_subcommand_from l list' -s p -l portage-tree -d "List pkgs in the main portage tree"
|
2018-04-06 18:10:44 +08:00
|
|
|
#complete -c equery -n '__fish_seen_subcommand_from l list' -s F -l format=TMPL -d "Specify a custom output format"
|
|
|
|
complete -c equery -n '__fish_seen_subcommand_from l list; and not __fish_contains_opt -s p portage-tree' \
|
2020-01-22 22:17:37 +08:00
|
|
|
-xa "(__fish_print_portage_installed_pkgs)"
|
2018-04-06 18:10:44 +08:00
|
|
|
complete -c equery -n '__fish_seen_subcommand_from l list; and __fish_contains_opt -s p portage-tree' \
|
2020-01-22 22:17:37 +08:00
|
|
|
-xa "(__fish_print_portage_available_pkgs)"
|
2018-03-24 02:42:30 +08:00
|
|
|
|
|
|
|
# meta
|
2019-05-05 18:53:09 +08:00
|
|
|
complete -c equery -n '__fish_seen_subcommand_from m meta' -s d -l description -d "Show extended pkg description"
|
|
|
|
complete -c equery -n '__fish_seen_subcommand_from m meta' -s H -l herd -d "Show pkg's herd(s)"
|
|
|
|
complete -c equery -n '__fish_seen_subcommand_from m meta' -s k -l keywords -d "Show keywords for all matching pkg versions"
|
2019-11-25 19:03:25 +08:00
|
|
|
complete -c equery -n '__fish_seen_subcommand_from m meta' -s l -l license -d "Show licenses for the best matching version"
|
2019-05-05 18:53:09 +08:00
|
|
|
complete -c equery -n '__fish_seen_subcommand_from m meta' -s m -l maintainer -d "Show the maintainer(s) for the pkg"
|
|
|
|
complete -c equery -n '__fish_seen_subcommand_from m meta' -s S -l stablreq -d "Show STABLEREQ arches (cc's) for all matching pkg versions"
|
|
|
|
complete -c equery -n '__fish_seen_subcommand_from m meta' -s u -l useflags -d "Show per-pkg USE flag descriptions"
|
|
|
|
complete -c equery -n '__fish_seen_subcommand_from m meta' -s U -l upstream -d "Show pkg's upstream information"
|
|
|
|
complete -c equery -n '__fish_seen_subcommand_from m meta' -s x -l xml -d "Show the plain metadata.xml file"
|
2006-11-08 05:17:08 +08:00
|
|
|
|
|
|
|
# size
|
2019-05-05 18:53:09 +08:00
|
|
|
complete -c equery -n '__fish_seen_subcommand_from s size' -s b -l bytes -d "Report size in bytes"
|
|
|
|
complete -c equery -n '__fish_seen_subcommand_from s size' -s f -l full-regex -d "Query is a regex"
|
2006-11-08 05:17:08 +08:00
|
|
|
|
|
|
|
# uses
|
2019-05-05 18:53:09 +08:00
|
|
|
complete -c equery -n '__fish_seen_subcommand_from u uses' -s a -l all -d "Include all pkg versions"
|
|
|
|
complete -c equery -n '__fish_seen_subcommand_from u uses' -s i -l ignore-l10n -d "Don't show l10n USE flags"
|
2018-03-24 02:42:30 +08:00
|
|
|
|
|
|
|
# which
|
2019-05-05 18:53:09 +08:00
|
|
|
complete -c equery -n '__fish_seen_subcommand_from w which' -s m -l include-masked -d "Return highest version ebuild available"
|
|
|
|
complete -c equery -n '__fish_seen_subcommand_from w which' -s e -l ebuild -d "Print the ebuild"
|