function __fish_pack_packages
    pack list | string split ' =>' --field 1
end

complete -c pack -s h -l help -d 'Prints help information'
complete -c pack -s V -l version -d 'Prints version information'
complete -c pack -n "__fish_use_subcommand" -f -a "list" -d 'List installed packages'
complete -c pack -n "__fish_use_subcommand" -f -a "install" -d 'Install new packages/plugins'
complete -c pack -n "__fish_use_subcommand" -f -a "uninstall" -d 'Uninstall packages/plugins'
complete -c pack -n "__fish_use_subcommand" -f -a "config" -d 'Configure/edit the package specific configuration'
complete -c pack -n "__fish_use_subcommand" -f -a "move" -d 'Move a package to a different category or make it optional.'
complete -c pack -n "__fish_use_subcommand" -f -a "update" -d 'Update packages'
complete -c pack -n "__fish_use_subcommand" -f -a "generate" -d 'Generate the pack package file'
complete -c pack -n "__fish_use_subcommand" -f -a "completions" -d 'Generates completion scripts for your shell'
complete -c pack -n "__fish_use_subcommand" -f -a "help" -d 'Prints this message or the help of the given subcommand(s)'
complete -c pack -n "__fish_seen_subcommand_from list" -s c -l category -d 'List packages under this category'
complete -c pack -n "__fish_seen_subcommand_from list" -s s -l start -d 'List start packages'
complete -c pack -n "__fish_seen_subcommand_from list" -s o -l opt -d 'List optional packages'
complete -c pack -n "__fish_seen_subcommand_from list" -s h -l help -d 'Prints help information'
complete -c pack -n "__fish_seen_subcommand_from list" -s V -l version -d 'Prints version information'
complete -c pack -n "__fish_seen_subcommand_from install" -s c -l category -d 'Install package under provided category'
complete -c pack -n "__fish_seen_subcommand_from install" -l on -d 'Command for loading the plugins'
complete -c pack -n "__fish_seen_subcommand_from install" -l for -d 'Load this plugins for specific types'
complete -c pack -n "__fish_seen_subcommand_from install" -l build -d 'Build command for build package'
complete -c pack -n "__fish_seen_subcommand_from install" -s j -l threads -d 'Installing packages concurrently'
complete -c pack -n "__fish_seen_subcommand_from install" -s o -l opt -d 'Install plugins as opt(ional)'
complete -c pack -n "__fish_seen_subcommand_from install" -s l -l local -d 'Install local plugins'
complete -c pack -n "__fish_seen_subcommand_from install" -s h -l help -d 'Prints help information'
complete -c pack -n "__fish_seen_subcommand_from install" -s V -l version -d 'Prints version information'
complete -c pack -n "__fish_seen_subcommand_from uninstall" -s a -l all -d 'remove all package related configuration as well'
complete -c pack -n "__fish_seen_subcommand_from uninstall" -s h -l help -d 'Prints help information'
complete -c pack -n "__fish_seen_subcommand_from uninstall" -f -a "(__fish_pack_packages)"
complete -c pack -n "__fish_seen_subcommand_from uninstall" -s V -l version -d 'Prints version information'
complete -c pack -n "__fish_seen_subcommand_from config" -s d -l delete -d 'Delete package configuration file'
complete -c pack -n "__fish_seen_subcommand_from config" -s h -l help -d 'Prints help information'
complete -c pack -n "__fish_seen_subcommand_from config" -s V -l version -d 'Prints version information'
complete -c pack -n "__fish_seen_subcommand_from config" -f -a "(__fish_pack_packages)"
complete -c pack -n "__fish_seen_subcommand_from move" -s o -l opt -d 'Make package optional'
complete -c pack -n "__fish_seen_subcommand_from move" -s h -l help -d 'Prints help information'
complete -c pack -n "__fish_seen_subcommand_from move" -s V -l version -d 'Prints version information'
complete -c pack -n "__fish_seen_subcommand_from move" -f -a "(__fish_pack_packages)"
complete -c pack -n "__fish_seen_subcommand_from update" -s s -l skip -d 'Skip packages'
complete -c pack -n "__fish_seen_subcommand_from update" -s p -l packfile -d 'Regenerate the \'_pack\' file (combine all package configurations)'
complete -c pack -n "__fish_seen_subcommand_from update" -s j -l threads -d 'Updating packages concurrently'
complete -c pack -n "__fish_seen_subcommand_from update" -s h -l help -d 'Prints help information'
complete -c pack -n "__fish_seen_subcommand_from update" -s V -l version -d 'Prints version information'
complete -c pack -n "__fish_seen_subcommand_from update" -f -a "(__fish_pack_packages)"
complete -c pack -n "__fish_seen_subcommand_from generate" -s h -l help -d 'Prints help information'
complete -c pack -n "__fish_seen_subcommand_from generate" -s V -l version -d 'Prints version information'
complete -c pack -n "__fish_seen_subcommand_from completions" -s h -l help -d 'Prints help information'
complete -c pack -n "__fish_seen_subcommand_from completions" -s V -l version -d 'Prints version information'
complete -c pack -n "__fish_seen_subcommand_from help" -s h -l help -d 'Prints help information'
complete -c pack -n "__fish_seen_subcommand_from help" -s V -l version -d 'Prints version information'
