fish-shell/share/functions/__fish_complete_pacman.fish
ridiculousfish b4447bfa4d Squashed commit of the following:
commit 1bbde16b17f04903340206bada9935ea64f785ba
Author: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Date:   Mon Apr 1 01:12:22 2013 -0500

    fix spelling in xterm.fish

    Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>

commit 392dd59da76e6a1293db79733e1975dbb9ef4032
Author: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Date:   Mon Apr 1 01:10:08 2013 -0500

    fix spelling in type.fish

    Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>

commit f82026828e4c08bdf355176f86489783c57efc80
Author: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Date:   Mon Apr 1 01:09:34 2013 -0500

    fix spelling in top.fish

    Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>

commit 196f2ec59c0904eb13159d1063e2e6c6edbd50a8
Author: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Date:   Mon Apr 1 01:08:16 2013 -0500

    fix spelling in scrot.fish

    Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>

commit 8400d97dce93afe48612c66eb8ddc2bd06b40968
Author: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Date:   Mon Apr 1 01:07:48 2013 -0500

    fix spelling in scp.fish

    Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>

commit b68bb3f36915520d2c271e48e2d5356e087e9fcf
Author: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Date:   Mon Apr 1 01:04:30 2013 -0500

    fix spelling in mount.fish

    Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>

commit 97000184afde10ca26b6dda8597baa0593bb4e09
Author: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Date:   Mon Apr 1 01:01:46 2013 -0500

    fix spelling in hg.fish

    Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>

commit 87ca4e71ce57842ab98e4d6b6f9274aafd9713a5
Author: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Date:   Mon Apr 1 01:00:37 2013 -0500

    fix spelling in gzip.fish

    Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>

commit 17246a21ad3df39660e6b4c86bf8c6a2239b416b
Author: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Date:   Mon Apr 1 01:00:07 2013 -0500

    fix spelling in gunzip.fish

    Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>

commit 0f618600508695ed5a93110568343f8a783db8c5
Author: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Date:   Mon Apr 1 00:59:37 2013 -0500

    fix spelling in grep.fish

    Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>

commit bacf6a62041d13f1766e90748cfc2c76e1b04b98
Author: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Date:   Mon Apr 1 00:58:16 2013 -0500

    fix spelling in git.fish

    Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>

commit f8f6a1914a8f2f60a14dac532f1d63dd8269f676
Author: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Date:   Mon Apr 1 00:56:45 2013 -0500

    fix spelling in fuser.fish

    Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>

commit dcdfd1552dfd360d1ce808706bc401d52cce22ce
Author: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Date:   Mon Apr 1 00:54:58 2013 -0500

    fix spelling in effectv.fish

    Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>

commit 7b4388364f546b81f0557c500bb6a5207931c3be
Author: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Date:   Mon Apr 1 00:53:45 2013 -0500

    fix spelling in du.fish

    Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>

commit 0450070e98adae2ebe19806f4fb74386a50de003
Author: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Date:   Mon Apr 1 00:52:55 2013 -0500

    fix spelling in df.fish

    Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>

commit 49ae24ae0dbd06c72e6c994f1ea4ca9b385fdda5
Author: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Date:   Mon Apr 1 00:49:00 2013 -0500

    fix spelling in cut.fish

    Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>

commit 4eccc923f389e2fc0c498fc63e4bbeeccc177e9a
Author: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Date:   Mon Apr 1 00:47:21 2013 -0500

    fix spelling in compare.fish

    Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>

commit 8c0cfb91c596ef7a1583877c8f38fab7e867cff2
Author: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Date:   Mon Apr 1 00:46:46 2013 -0500

    fix spelling in chown.fish

    Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>

commit 4518b06c3fc8c565038ccbeeb0d2f8aea73e1ee0
Author: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Date:   Mon Apr 1 00:46:08 2013 -0500

    fix spelling in chgrp.fish

    Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>

commit a0a4fb3dc271c469482e87a0f9efab4016596f82
Author: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Date:   Mon Apr 1 00:43:04 2013 -0500

    fix spelling in apt-setup.fish

    Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>

commit 740e75e5316e73fb03c00bd9b482786d1f387cc5
Author: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Date:   Mon Apr 1 00:42:25 2013 -0500

    fix spelling in apt-rdepends.fish

    Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>

commit 7a2727bcb96e58a023d0f8ab807f839e76555375
Author: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Date:   Mon Apr 1 00:27:27 2013 -0500

    fix spelling in fish_complete_pacman.fish

    Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>

commit 0e28ff4c1c90bdbf1e1b780d0ab3c2ba04b3a463
Author: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Date:   Mon Apr 1 00:26:17 2013 -0500

    fix spelling in fish_complete_pgrep.fish

    Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>

commit 1ca9fad713c460debcd851dfcffa135f3b579561
Author: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Date:   Mon Apr 1 00:24:13 2013 -0500

    fix spelling in trap.fish

    Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>

commit deb0c2129d50d627d720cbd549cf8aadc3113243
Author: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Date:   Mon Apr 1 00:19:00 2013 -0500

    fix spelling in fish_not_contain_opt.fish

    Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>

commit 8a40bd08b37d5c80041b7beb58fb82d9b0592b5d
Author: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Date:   Mon Apr 1 00:18:16 2013 -0500

    fix spelling in fish_make_completion.fish

    Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>

commit f1c48dc8236a8eb5ba0e45e985e8dd7eadfb88e5
Author: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Date:   Mon Apr 1 00:17:09 2013 -0500

    fix spelling in fish_gnu_complete.fish

    Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>

commit b6813883d9355f8e15917769d46b58cc8fab840d
Author: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Date:   Mon Apr 1 00:16:33 2013 -0500

    fix spelling in fish_git_prompt.fish

    Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>

commit 97e3e74ddb743061a8e4349bf7895cf98cf9d9b2
Author: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Date:   Mon Apr 1 00:13:11 2013 -0500

    fix spelling in fish_complete_vi.fish

    Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>

commit 7c31d5fec8f855fbc3496be7200915a1d2dc4d46
Author: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Date:   Mon Apr 1 00:10:47 2013 -0500

    fix spelling of in fish_complete_tex.fish

    Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>

commit 3f06bdb91942c4d0e686d1bb8b5eff1983a91304
Author: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Date:   Mon Apr 1 00:06:45 2013 -0500

    fix spelling in fish_complete_list.fish

    Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>

commit 5bfd9ef40547b744c9bbfb4cc6f8a7d880d8f3d6
Author: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Date:   Mon Apr 1 00:03:14 2013 -0500

    fix spelling in fish_complete_atool.fish

    Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>

commit b84a43ff0bad5e206a591891b6c7ff9028e14eb5
Author: Greg Dietsche <Gregory.Dietsche@cuw.edu>
Date:   Sun Mar 31 23:40:28 2013 -0500

    fix spelling of protocol in fish_complete_ssh.fish

    Signed-off-by: Greg Dietsche <Gregory.Dietsche@cuw.edu>
2013-04-01 10:49:02 -07:00

113 lines
7.2 KiB
Fish

function __fish_complete_pacman -d 'Complete pacman (ARCH package manager)' --argument-names progname
# Completions for pacman
# Author: Giorgio Lando <patroclo7@gmail.com>
# Updated by maxfl, SanskritFritz.
set -q progname[1]; or set -l progname pacman
set -l listinstalled "(pacman -Q | tr ' ' \t)"
set -l listall "(pacman -Sl | cut --delim ' ' --fields 2- | tr ' ' \t)"
set -l listrepos "(cat /etc/pacman.conf | grep '^\[.\+\]' | sed 's/[]\[]//g')"
set -l listgroups "(pacman -Sg | sed 's/\(.*\)/\1\tPackage group/g')"
set -l noopt 'commandline | not sgrep -qe "-[a-z]*[DQRSTU]\|--database\|--query\|--sync\|--remove\|--upgrade\|--deptest"'
set -l database 'commandline | sgrep -qe "-[a-z]*D\|--database"'
set -l query 'commandline | sgrep -qe "-[a-z]*Q\|--query"'
set -l remove 'commandline | sgrep -qe "-[a-z]*R\|--remove"'
set -l sync 'commandline | sgrep -qe "-[a-z]*S\|--sync"'
set -l upgrade 'commandline | sgrep -qe "-[a-z]*U\|--upgrade"'
# By default fish expands the arguments with the option which is not desired
# due to performance reasons.
# This will make sure we are expanding an argument and not an option:
set -l argument 'not expr -- (commandline --current-token) : "^-.*" > /dev/null'
# Primary operations
complete -c $progname -s D -f -l database -n $noopt -d 'Modify the package database'
complete -c $progname -s Q -f -l query -n $noopt -d 'Query the package database'
complete -c $progname -s R -f -l remove -n $noopt -d 'Remove packages from the system'
complete -c $progname -s S -f -l sync -n $noopt -d 'Synchronize packages'
complete -c $progname -s T -f -l deptest -n $noopt -d 'Check dependencies'
complete -c $progname -s U -f -l upgrade -n $noopt -d 'Upgrade or add a local package'
complete -c $progname -s V -f -l version -d 'Display version and exit'
complete -c $progname -s h -f -l help -d 'Display help'
# General options
complete -c $progname -s b -l dbpath -d 'Alternative database location' -xa '(__fish_complete_directories)'
complete -c $progname -s r -l root -d 'Alternative installation root'
complete -c $progname -s v -l verbose -d 'Output more status messages'
complete -c $progname -l arch -d 'Alternate architecture'
complete -c $progname -l cachedir -d 'Alternative package cache location'
complete -c $progname -l config -d 'Alternate config file'
complete -c $progname -l debug -d 'Display debug messages'
complete -c $progname -l gpgdir -d 'GPG directory to verify signatures'
complete -c $progname -l logfile -d 'Specify alternative log file'
complete -c $progname -l noconfirm -d 'Bypass any question'
# Transaction options (sync, remove, upgrade)
for condition in sync remove upgrade
complete -c $progname -n $$condition -s d -l nodeps -d 'Skip [all] dependency checks'
complete -c $progname -n $$condition -l dbonly -d 'Modify database entry only'
complete -c $progname -n $$condition -l noprogressbar -d 'Do not display progress bar'
complete -c $progname -n $$condition -l noscriptlet -d 'Do not execute install script'
complete -c $progname -n $$condition -s p -l print -d 'Dry run, only print targets'
complete -c $progname -n $$condition -l print-format -x -d 'Specify printf-like format'
end
# Database and upgrade options (database, sync, upgrade)
for condition in database sync upgrade
complete -c $progname -n $$condition -l asdeps -d 'Mark PACKAGE as dependency'
complete -c $progname -n $$condition -l asexplicit -d 'Mark PACKAGE as explicitly installed'
end
# Upgrade options (sync, upgrade)
for condition in sync upgrade
complete -c $progname -n $$condition -s f -l force -d 'Bypass file conflict checks'
complete -c $progname -n $$condition -l ignore -d 'Ignore upgrade of PACKAGE' -xa "$listinstalled"
complete -c $progname -n $$condition -l ignoregroup -d 'Ignore upgrade of GROUP' -xa "$listgroups"
complete -c $progname -n $$condition -l needed -d 'Do not reinstall up-to-date targets'
complete -c $progname -n $$condition -l recursive -d 'Recursively reinstall all dependencies'
end
# Query and sync options
for condition in query sync
complete -c $progname -n $$condition -s g -l groups -d 'Display all packages in GROUP' -xa "$listgroups"
complete -c $progname -n $$condition -s i -l info -d 'Display information on PACKAGE'
complete -c $progname -n $$condition -s q -l quiet -d 'Show less information'
complete -c $progname -n $$condition -s s -l search -r -d 'Search packages for regexp'
end
# Query options
complete -c $progname -n $query -s c -l changelog -d 'View the change log of PACKAGE'
complete -c $progname -n $query -s d -l deps -d 'List only non-explicit packages (dependencies)'
complete -c $progname -n $query -s e -l explicit -d 'List only explicitly installed packages'
complete -c $progname -n $query -s k -l check -d 'Check if all files owned by PACKAGE are present'
complete -c $progname -n $query -s l -l list -d 'List all files owned by PACKAGE'
complete -c $progname -n $query -s m -l foreign -d 'List all packages not in the database'
complete -c $progname -n $query -s o -l owns -r -d 'Search for the package that owns FILE' -xa ''
complete -c $progname -n $query -s p -l file -d 'Apply the query to a package file, not package' -xa ''
complete -c $progname -n $query -s t -l unrequired -d 'List only unrequired packages'
complete -c $progname -n $query -s u -l upgrades -d 'List only out-of-date packages'
complete -c $progname -n "$query; and $argument" -xa $listinstalled -d 'Installed package'
# Remove options
complete -c $progname -n $remove -s c -l cascade -d 'Also remove packages depending on PACKAGE'
complete -c $progname -n $remove -s n -l nosave -d 'Ignore file backup designations'
complete -c $progname -n $remove -s s -l recursive -d 'Also remove dependencies of PACKAGE'
complete -c $progname -n $remove -s u -l unneeded -d 'Only remove targets not required by PACKAGE'
complete -c $progname -n "$remove; and $argument" -xa $listinstalled -d 'Installed package'
# Sync options
complete -c $progname -n $sync -s c -l clean -d 'Remove [all] packages from cache'
complete -c $progname -n $sync -s l -l list -xa "$listrepos" -d 'List all packages in REPOSITORY'
complete -c $progname -n $sync -s u -l sysupgrade -d 'Upgrade all packages that are out of date'
complete -c $progname -n $sync -s w -l downloadonly -d 'Only download the target packages'
complete -c $progname -n $sync -s y -l refresh -d 'Download fresh copy of the package list'
complete -c $progname -n "$argument; and $sync" -xa "$listall $listgroups"
# Upgrade options
complete -c $progname -n "$upgrade; and $argument" -xa '(__fish_complete_suffix pkg.tar.xz)' -d 'Package file'
complete -c $progname -n "$upgrade; and $argument" -xa '(__fish_complete_suffix pkg.tar.gz)' -d 'Package file'
end