fork/fish-shell
git clone https://git.julia.blue/fork/fish-shell
0df6fa791
master
1# This can't currently be wrapped as the pacman completions rely on variables whose value this needs to change 2# complete -c aura -w pacman 3set -l listinstalled"(pacman -Q | tr ' ' \t)" 4set -l listall"(__fish_print_pacman_packages)" 5set -l listrepos"(__fish_print_pacman_repos)" 6set -l listgroups"(pacman -Sg | sed 's/\(.*\)/\1\tPackage group/g')" 7 8set -l noopt'not __fish_contains_opt -s S -s D -s Q -s R -s U -s T -s A -s B -s C -s L -s O database query sync remove upgrade deptest aursync save downgrade viewlog orphans check conf deps free stats thanks' 9set -l database'__fish_contains_opt -s D database' 10set -l query'__fish_contains_opt -s Q query' 11set -l remove'__fish_contains_opt -s R remove' 12set -l sync'__fish_contains_opt -s S sync' 13set -l upgrade'__fish_contains_opt -s U upgrade' 14set -l aur'__fish_contains_opt -s A aursync' 15set -l save'__fish_contains_opt -s B save' 16set -l downgrade'__fish_contains_opt -s C downgrade' 17set -l orphans'__fish_contains_opt -s O orphans' 18set -l logfile'__fish_contains_opt -s L viewlog' 19set -l check'__fish_contains_opt check' 20set -l conf'__fish_contains_opt conf' 21set -l deps'__fish_contains_opt deps' 22set -l free'__fish_contains_opt stats' 23set -l thanks'__fish_contains_opt thanks' 24set -l search'__fish_contains_opt -s s search' 25 26# By default fish expands the arguments with the option which is not desired 27# due to performance reasons. 28# This will make sure we are expanding an argument and not an option: 29set -l argument'not expr -- (commandline --current-token) : "^-.*" > /dev/null' 30 31# Primary operations 32complete -c aura -s A -f -l aursync -n$noopt -d'Synchronize AUR packages' 33complete -c aura -s B -f -l save -n$noopt -d'Save and restore package state' 34complete -c aura -s C -f -l downgrade -n$noopt -d'Package cache actions' 35complete -c aura -s D -f -l database -n$noopt -d'Modify the package database' 36complete -c aura -s L -f -l viewlog -n$noopt -d'Pacman log actions' 37complete -c aura -s O -f -l orphans -n$noopt -d'Operate on orphan packages' 38complete -c aura -s Q -f -l query -n$noopt -d'Query the package database' 39complete -c aura -s R -f -l remove -n$noopt -d'Remove packages from the system' 40complete -c aura -s S -f -l sync -n$noopt -d'Synchronize packages' 41complete -c aura -s T -f -l deptest -n$noopt -d'Check dependencies' 42complete -c aura -s U -f -l upgrade -n$noopt -d'Upgrade or add a local package' 43complete -c aura -l check -n$noopt -d'Validate your system' 44complete -c aura -l conf -n$noopt -d'View various configuration settings and files' 45complete -c aura -l deps -n$noopt -d'Output a dependency graph' 46complete -c aura -l free -n$noopt -d'State of Free Software install on the system' 47complete -c aura -l stats -n$noopt -d'View statistics about your machine or about Aura itself' 48complete -c aura -l thanks -n$noopt -d'The people behind Aura' 49complete -c aura -s V -f -l version -d'Display version and exit' 50complete -c aura -s h -f -l help -d'Display help' 51 52# General options 53complete -c aura -l log-level -d'Minimum level of Aura log messages to display' 54complete -c aura -l noconfirm -d'Do not ask for any confirmation' 55 56# Transaction options (sync, remove, upgrade) 57for conditionin sync remove upgrade 58complete -c aura -n$$condition -s d -l nodeps -d'Skip [all] dependency checks' 59complete -c aura -n$$condition -l dbonly -d'Modify database entry only' 60complete -c aura -n$$condition -l noprogressbar -d'Do not display progress bar' 61complete -c aura -n$$condition -l noscriptlet -d'Do not execute install script' 62complete -c aura -n$$condition -s p -l print -d'Dry run, only print targets' 63complete -c aura -n$$condition -l print-format -x -d'Specify printf-like format' 64end 65 66# Database and upgrade options (database, sync, upgrade) 67for conditionin database sync upgrade 68complete -c aura -n$$condition -l asdeps -d'Mark PACKAGE as dependency' 69complete -c aura -n$$condition -l asexplicit -d'Mark PACKAGE as explicitly installed' 70end 71 72# Upgrade options (sync, upgrade) 73for conditionin sync upgrade 74complete -c aura -n$$condition -s f -l force -d'Bypass file conflict checks' 75complete -c aura -n$$condition -l ignore -d'Ignore upgrade of PACKAGE' -xa" $listinstalled " 76complete -c aura -n$$condition -l ignoregroup -d'Ignore upgrade of GROUP' -xa" $listgroups " 77complete -c aura -n$$condition -l needed -d'Do not reinstall up-to-date targets' 78complete -c aura -n$$condition -l recursive -d'Recursively reinstall all dependencies' 79end 80 81# Query and sync options 82for conditionin query sync 83complete -c aura -n$$condition -s g -l groups -d'Display all packages in GROUP' -xa" $listgroups " 84complete -c aura -n$$condition -s i -l info -d'Display information on PACKAGE' 85complete -c aura -n$$condition -s q -l quiet -d'Show less information' 86complete -c aura -n$$condition -s s -l search -r -d'Search packages for regexp' 87end 88 89for conditionin aur 90complete -c aura -n$$condition -s a -l delmakedeps -d'Remove packages only needed during installation' 91complete -c aura -n$$condition -s c -l clean -d'Clear the build directory after a package is built' 92complete -c aura -n$$condition -s d -l dryrun -d'Show available upgrades, but do not perform them' 93complete -c aura -n$$condition -s k -l diff -d'Show PKGBUILD diffs' 94complete -c aura -n$$condition -l git -d'Include -git/-svn/etc packages' 95end 96 97# AUR options 98complete -c aura -n$aur -s i -l info -d'View package information' 99complete -c aura -n$aur -s o -l open -d'Open a given package\'s AUR package' 100complete -c aura -n$aur -s p -l pkgbuild -d'View the packages\'s PKGBUILD' 101complete -c aura -n$aur -s s -l search -r -d'Search the AUR for matching terms' 102complete -c aura -n$aur -s u -l sysupgrade -d'Upgrade all installed AUR packages' 103complete -c aura -n$aur -s v -l provides -d'Search for packages that "provide" some package identity' 104complete -c aura -n$aur -s w -l clone -d'Download the source tarball' 105complete -c aura -n$aur -s y -l refresh -d'Pull the latest changes for every local package clone' 106complete -c aura -n$aur -l build -r -d'Specify a build location' 107complete -c aura -n$aur -l builduser -r -d'User to build as' 108complete -c aura -n$aur -l hotedit -d'Prompt for PKGBUILD editing' 109complete -c aura -n$aur -l ignore -r -d'Ignore a package upgrade' 110complete -c aura -n$aur -l nocheck -d'Do not run the check() function of the PKGBUILD' 111complete -c aura -n$aur -l shellcheck -d'Run shellcheck on PKGBUILDs before building' 112complete -c aura -n$aur -l skipdepcheck -d'Perform no dependency resolution' 113complete -c aura -n$aur -l skipinteg -d'Do not perform any verification checks on source files' 114complete -c aura -n$aur -l skippgpcheck -d'Do not verify source files with PGP signatures' 115complete -c aura -n" $aur ; and $search " -l abc -d'Sort alphabetically' 116complete -c aura -n" $aur ; and $search " -l limit -d'Limit the results to N results' 117complete -c aura -n" $aur ; and $search " -s r -l reverse -d'Reverse the search results' 118complete -c aura -n" $aur ; and $search " -s q -l quiet -d'Only print matching package names' 119 120# Backup options 121complete -c aura -n$save -s c -l clean -d'Remove all but the given number of backups' 122complete -c aura -n$save -s l -l list -d'Show all saved package snapshot filenames' 123complete -c aura -n$save -s r -l restore -d'Restores a record kept with -B' 124 125# Downgrade options 126complete -c aura -n$downgrade -s b -l backup -d'Backup to directory' 127complete -c aura -n$downgrade -s c -l clean -d'Save this many versions' 128complete -c aura -n$downgrade -s i -l info -d'Look up specific packages for info on their cache entries' 129complete -c aura -n$downgrade -s l -l list -d'Print the contents of the package cache' 130complete -c aura -n$downgrade -s m -l missing -d'Display packages that don\'t have a tarball in the cache' 131complete -c aura -n$downgrade -s n -l notsaved -d'Delete only those tarballs which aren\'t present in a snapshot' 132complete -c aura -n$downgrade -s s -l search -r -d'Search via regex' 133complete -c aura -n$downgrade -s t -l invalid -r -d'Delete invalid tarballs from the cache' 134complete -c aura -n$downgrade -s y -l refresh -r -d'Download missing tarballs of installed packages' 135 136# Logfile options 137complete -c aura -n$logfile -s i -l info -d'Show package history' 138complete -c aura -n$logfile -s s -l search -r -d'Search via regex' 139 140# Orphan options 141complete -c aura -n$orphans -s a -l adopt -d'Mark a package as being explicitly installed' 142complete -c aura -n$orphans -s e -l elderly -d'Display all explicitly installed, top-level packages' 143complete -c aura -n$orphans -s j -l abandon -d'Uninstall orphan packages' 144 145# Query options 146complete -c aura -n$query -s c -l changelog -d'View the change log of PACKAGE' 147complete -c aura -n$query -s d -l deps -d'List only non-explicit packages (dependencies)' 148complete -c aura -n$query -s e -l explicit -d'List only explicitly installed packages' 149complete -c aura -n$query -s k -l check -d'Check if all files owned by PACKAGE are present' 150complete -c aura -n$query -s l -l list -d'List all files owned by PACKAGE' 151complete -c aura -n$query -s m -l foreign -d'List all packages not in the database' 152complete -c aura -n$query -s o -l owns -r -d'Search for the package that owns FILE' 153complete -c aura -n$query -s p -l file -d'Apply the query to a package file, not package' 154complete -c aura -n$query -s t -l unrequired -d'List only unrequired packages' 155complete -c aura -n$query -s u -l upgrades -d'List only out-of-date packages' 156complete -c aura -n" $query ; and $argument " -xa$listinstalled -d'Installed package' 157 158# Remove options 159complete -c aura -n$remove -s c -l cascade -d'Also remove packages depending on PACKAGE' 160complete -c aura -n$remove -s n -l nosave -d'Ignore file backup designations' 161complete -c aura -n$remove -s s -l recursive -d'Also remove dependencies of PACKAGE' 162complete -c aura -n$remove -s u -l unneeded -d'Only remove targets not required by PACKAGE' 163complete -c aura -n" $remove ; and $argument " -xa$listinstalled -d'Installed package' 164 165# Sync options 166complete -c aura -n$sync -s c -l clean -d'Remove [all] packages from cache' 167complete -c aura -n$sync -s l -l list -xa" $listrepos " -d'List all packages in REPOSITORY' 168complete -c aura -n$sync -s u -l sysupgrade -d'Upgrade all packages that are out of date' 169complete -c aura -n$sync -s w -l downloadonly -d'Only download the target packages' 170complete -c aura -n$sync -s y -l refresh -d'Download fresh copy of the package list' 171complete -c aura -n" $sync ; and $argument " -xa" $listall $listgroups " 172 173# Upgrade options 174complete -c aura -n" $upgrade ; and $argument " -k -a'(__fish_complete_suffix pkg.tar.xz pkg.tar.gz pkg.tar.zst)' -d'Package file' 175 176# Conf options 177complete -c aura -n$conf -s a -l aura -d'View the contents of your Aura config' 178complete -c aura -n$conf -s g -l gen -d'Output your full current config as legal TOML' 179complete -c aura -n$conf -s m -l makepkg -d'View the Makepkg conf' 180complete -c aura -n$conf -s p -l pacman -d'View the Pacman conf' 181 182# Deps options 183complete -c aura -n$deps -s l -l limit -d'The number of layers up or down to allow' 184complete -c aura -n$deps -s o -l optional -d'Include optional dependencies' 185complete -c aura -n$deps -s r -l reverse -d'Display packages that depend on the given args' 186complete -c aura -n$deps -l open -d'Open the output image automatically' 187complete -c aura -n$deps -l raw -d'Print the raw DOT output' 188 189# Free options 190complete -c aura -n$free -l copyleft -d'Consider only Copyleft licenses' 191complete -c aura -n$free -l lenient -d'Allow FOSS-derived custom licenses'