fork/fish-shell
git clone https://git.julia.blue/fork/fish-shell
78c948282
master
1#completion for prt-get 2# A function to verify if prt-get (the crux package management tool) needs to be completed by a further command 3 4# a function to obtain a list of installed packages with prt-get 5function __fish_prt_packages -d'Obtain a list of installed packages' 6prt-get listinst 7end 8 9# a function to obtain a list of ports with prt-get 10 11function __fish_prt_ports -d'Obtain a list of ports' 12prt-get list 13end 14 15function __fish_prt_no_subcommand -d'Test if prt-get has yet to be given the command' 16for iin ( commandline -xpc) 17if contains --$i install depinst grpinst update remove sysup lock unlock listlocked diff quickdiff search dsearch fsearch info path readme depends quickdep dependent deptree dup list printf listinst listorphans isinst current ls cat edit help dumpconfig version cache 18return 1 19end 20end 21return 0 22end 23 24# a function to verify if prt-get should have packages as potential completion 25function __fish_prt_use_package -d'Test if prt-get should have packages as potential completion' 26for iin ( commandline -xpc) 27if contains --$i update remove lock unlock current 28return 0 29end 30end 31return 1 32end 33 34# a function to test if prt-get should have ports as potential completions 35function __fish_prt_use_port -d'Test if prt-get should have ports as potential completion' 36for iin ( commandline -xpc) 37if contains --$i install depinst grpinst diff depends quickdep dependent deptree isinst info path readme ls cat edit 38return 0 39end 40end 41return 1 42end 43 44complete -f -c prt-get -n __fish_prt_use_package -a'(__fish_prt_packages)' -d Package 45complete -f -c prt-get -n __fish_prt_use_port -a'(__fish_prt_ports)' -d Port 46 47complete -f -n __fish_prt_no_subcommand -c prt-get -a install -d'Install listed ports' 48complete -f -n __fish_prt_no_subcommand -c prt-get -a depinst -d'Install listed ports and their deps' 49complete -f -n __fish_prt_no_subcommand -c prt-get -a grpinst -d'Install listed ports, stop if one fails' 50complete -f -n __fish_prt_no_subcommand -c prt-get -a update -d'Update listed packages' 51complete -f -n __fish_prt_no_subcommand -c prt-get -a remove -d'Remove listed packages' 52complete -f -n __fish_prt_no_subcommand -c prt-get -a sysup -d'Update all outdated installed packages' 53complete -f -n __fish_prt_no_subcommand -c prt-get -a lock -d'Do not update this in sysup' 54complete -f -n __fish_prt_no_subcommand -c prt-get -a unlock -d'Remove this from lock' 55complete -f -n __fish_prt_no_subcommand -c prt-get -a diff -d'Print differences between installed packages and ports in the port tree' 56complete -f -n __fish_prt_no_subcommand -c prt-get -a search -d'Search for an expr in port names' 57complete -f -n __fish_prt_no_subcommand -c prt-get -a dsearch -d'Search for an expr in port names and descriptions' 58complete -f -n __fish_prt_no_subcommand -c prt-get -a info -d'Print info on a port' 59complete -f -n __fish_prt_no_subcommand -c prt-get -a fsearch -d'Search for a pattern in the footprints in the ports tree' 60complete -f -n __fish_prt_no_subcommand -c prt-get -a path -d'Print the path of a port' 61complete -f -n __fish_prt_no_subcommand -c prt-get -a readme -d'Print the eventual README of a port' 62complete -f -n __fish_prt_no_subcommand -c prt-get -a depends -d'Print a list of deps for the listed ports' 63complete -f -n __fish_prt_no_subcommand -c prt-get -a quickdeo -d'Print a simple list of deps for the listed ports' 64complete -f -n __fish_prt_no_subcommand -c prt-get -a deptree -d'Print a deptree for the port' 65complete -f -n __fish_prt_no_subcommand -c prt-get -a dup -d'List ports in multiple directories' 66complete -f -n __fish_prt_no_subcommand -c prt-get -a list -d'List all the ports' 67complete -f -n __fish_prt_no_subcommand -c prt-get -a printf -d'Print formatted list of ports' 68complete -f -n __fish_prt_no_subcommand -c prt-get -a listinst -d'List installed packages' 69complete -f -n __fish_prt_no_subcommand -c prt-get -a listorphans -d'List installed packages which have no dependent packages' 70complete -f -n __fish_prt_no_subcommand -c prt-get -a isinst -d'Check if a port is installed' 71complete -f -n __fish_prt_no_subcommand -c prt-get -a current -d'Print the version of an installed package' 72complete -f -n __fish_prt_no_subcommand -c prt-get -a ls -d'Print the listing of the directory of a port' 73complete -f -n __fish_prt_no_subcommand -c prt-get -a cat -d'Print a file in a port to stdout' 74complete -f -n __fish_prt_no_subcommand -c prt-get -a edit -d'Edit a file in a port' 75complete -f -n __fish_prt_no_subcommand -c prt-get -a help -d'Shows a help screen' 76complete -f -n __fish_prt_no_subcommand -c prt-get -a dumpconfig -d'Print the configuration of prt-get' 77complete -f -n __fish_prt_no_subcommand -c prt-get -a version -d'Show the current version of prt-get' 78complete -f -n __fish_prt_no_subcommand -c prt-get -a cache -d'Create a cache for prt-get' 79complete -c prt-get -o f -o i -d'Force install' 80complete -c prt-get -o fr -d'Force rebuild' 81complete -c prt-get -o um -d'Update md5sum' 82complete -c prt-get -o im -d'Ignore md5sum' 83complete -c prt-get -o uf -d'Update footprint' 84complete -c prt-get -o if -d'Ignore footprint' 85complete -c prt-get -o ns -d'No stripping' 86complete -c prt-get -o kw -d'Keep work directory' 87complete -c prt-get -l ignore -a'(__fish_prt_ports)' -r -f -d'Ignore the listed ports' 88complete -c prt-get -l cache -d'Use cache' 89complete -c prt-get -l test -d'Dry run' 90complete -c prt-get -l pre-install -d'Exec eventual pre-install script' 91complete -c prt-get -l post-install -d'Exec eventual post-install script' 92complete -c prt-get -l install-scripts -d'Exec eventual pre-post-install scripts' 93complete -c prt-get -l no-std-config -r -d'Ignore default config file' 94complete -c prt-get -l config-prepend -r -d'Prepend string to config file' 95complete -c prt-get -l config-append -r -d'Append string to config file' 96complete -c prt-get -l config-set -r -d'Overrirde config file with string' 97complete -c prt-get -o v -d'Be verbose' 98complete -c prt-get -l margs -r -d'Arguments for pkgmk' 99complete -c prt-get -l aargs -r -d'Arguments for pkgadd' 100complete -c prt-get -l rargs -r -d'Arguments for pkgrm' 101complete -c prt-get -l prefer-higher -o ph -d'Prefer higher version' 102complete -c prt-get -l strict-diff -o sd -d'Override prefer-higher' 103complete -c prt-get -l config -r -d'Use alternative config file' 104complete -c prt-get -l install-root -r -d'Use this alternative root for installation' 105complete -c prt-get -l log -d'Write output to log file' 106 107complete -f -c prt-cache -n __fish_prt_use_package -a'(__fish_prt_packages)' -d Port 108complete -f -c prt-cache -n __fish_prt_use_port -a'(__fish_prt_ports)' -d Package 109 110complete -f -n __fish_prt_no_subcommand -c prt-cache -a install -d'Install listed ports' 111complete -f -n __fish_prt_no_subcommand -c prt-cache -a depinst -d'Install listed ports and their deps' 112complete -f -n __fish_prt_no_subcommand -c prt-cache -a grpinst -d'Install listed ports, stop if one fails' 113complete -f -n __fish_prt_no_subcommand -c prt-cache -a update -d'Update listed packages' 114complete -f -n __fish_prt_no_subcommand -c prt-cache -a remove -d'Remove listed packages' 115complete -f -n __fish_prt_no_subcommand -c prt-cache -a sysup -d'Update all outdated installed packages' 116complete -f -n __fish_prt_no_subcommand -c prt-cache -a lock -d'Do not update this in sysup' 117complete -f -n __fish_prt_no_subcommand -c prt-cache -a unlock -d'Remove this from lock' 118complete -f -n __fish_prt_no_subcommand -c prt-cache -a diff -d'Print differences between installed packages and ports in the port tree' 119complete -f -n __fish_prt_no_subcommand -c prt-cache -a search -d'Search for an expr in port names' 120complete -f -n __fish_prt_no_subcommand -c prt-cache -a dsearch -d'Search for an expr in port names and descriptions' 121complete -f -n __fish_prt_no_subcommand -c prt-cache -a info -d'Print info on a port' 122complete -f -n __fish_prt_no_subcommand -c prt-cache -a fsearch -d'Search for a pattern in the footprints in the ports tree' 123complete -f -n __fish_prt_no_subcommand -c prt-cache -a path -d'Print the path of a port' 124complete -f -n __fish_prt_no_subcommand -c prt-cache -a readme -d'Print the eventual README of a port' 125complete -f -n __fish_prt_no_subcommand -c prt-cache -a depends -d'Print a list of deps for the listed ports' 126complete -f -n __fish_prt_no_subcommand -c prt-cache -a quickdeo -d'Print a simple list of deps for the listed ports' 127complete -f -n __fish_prt_no_subcommand -c prt-cache -a deptree -d'Print a deptree for the port' 128complete -f -n __fish_prt_no_subcommand -c prt-cache -a list -d'List all the ports' 129complete -f -n __fish_prt_no_subcommand -c prt-cache -a printf -d'Print formatted list of ports' 130complete -f -n __fish_prt_no_subcommand -c prt-cache -a listinst -d'List installed packages' 131complete -f -n __fish_prt_no_subcommand -c prt-cache -a listorphans -d'List installed packages which have no dependent packages' 132complete -f -n __fish_prt_no_subcommand -c prt-cache -a current -d'Print the version of an installed package' 133complete -f -n __fish_prt_no_subcommand -c prt-cache -a ls -d'Print the listing of the directory of a port' 134complete -f -n __fish_prt_no_subcommand -c prt-cache -a cat -d'Print a file in a port to stdout' 135complete -f -n __fish_prt_no_subcommand -c prt-cache -a edit -d'Edit a file in a port' 136complete -f -n __fish_prt_no_subcommand -c prt-cache -a help -d'Shows a help screen' 137complete -f -n __fish_prt_no_subcommand -c prt-cache -a dumpconfig -d'Print the configuration of prt-get' 138complete -f -n __fish_prt_no_subcommand -c prt-cache -a version -d'Show the current version of prt-get' 139complete -f -n __fish_prt_no_subcommand -c prt-cache -a cache -d'Create a cache for prt-get' 140complete -c prt-cache -o f -o i -d'Force install' 141complete -c prt-cache -o fr -d'Force rebuild' 142complete -c prt-cache -o um -d'Update md5sum' 143complete -c prt-cache -o im -d'Ignore md5sum' 144complete -c prt-cache -o uf -d'Update footprint' 145complete -c prt-cache -o if -d'Ignore footprint' 146complete -c prt-cache -o ns -d'No stripping' 147complete -c prt-cache -o kw -d'Keep work directory' 148complete -c prt-cache -l ignore -a'(__fish_prt_ports)' -r -f -d'Ignore the listed ports' 149complete -c prt-cache -l test -d'Dry run' 150complete -c prt-cache -l pre-install -d'Exec eventual pre-install script' 151complete -c prt-cache -l post-install -d'Exec eventual post-install script' 152complete -c prt-cache -l install-scripts -d'Exec eventual pre-post-install scripts' 153complete -c prt-cache -l no-std-config -r -d'Ignore default config file' 154complete -c prt-cache -l config-prepend -r -d'Prepend string to config file' 155complete -c prt-cache -l config-append -r -d'Append string to config file' 156complete -c prt-cache -l config-set -r -d'Overrirde config file with string' 157complete -c prt-cache -o v -d'Be verbose' 158complete -c prt-cache -l margs -r -d'Arguments for pkgmk' 159complete -c prt-cache -l aargs -r -d'Arguments for pkgadd' 160complete -c prt-cache -l rargs -r -d'Arguments for pkgrm' 161complete -c prt-cache -l prefer-higher -o ph -d'Prefer higher version' 162complete -c prt-cache -l strict-diff -o sd -d'Override prefer-higher' 163complete -c prt-cache -l config -r -d'Use alternative config file' 164complete -c prt-cache -l install-root -r -d'Use this alternative root for installation' 165complete -c prt-cache -l log -d'Write output to log file'