diff --git a/share/completions/ports.fish b/share/completions/ports.fish new file mode 100644 index 000000000..beabb735c --- /dev/null +++ b/share/completions/ports.fish @@ -0,0 +1,8 @@ +#completion for ports + +complete -f -c ports -s u -l update -a '(__fish_ports_dirs)' -d 'Update ports' +complete -f -c ports -s l -l list -d 'List ports' +complete -f -c ports -s d -l diff -d 'List version diffs between local and installed ports' +complete -f -c ports -s v -l version -d 'Print version' +complete -f -c ports -s h -l help -d 'Print help' + diff --git a/share/functions/__fish_ports_dirs.fish b/share/functions/__fish_ports_dirs.fish new file mode 100644 index 000000000..969569f95 --- /dev/null +++ b/share/functions/__fish_ports_dirs.fish @@ -0,0 +1,5 @@ +# a function to print a list of ports local collections + +function __fish_ports_dirs -d 'Obtain a list of ports local collections' + ls /usr/ports +end