mirror of
https://github.com/clearlinux/swupd-client.git
synced 2026-09-08 14:42:02 +00:00
Remove the script which creates the completion script based on the output of swupd --help. It wasn't being used (e.g. the completion didn't have bundle-list in it). Restructure the completion script to use a case statement to list the valid completion options. IMHO this makes the code easier to understand. Add in package name completion for bundle-add. This requires /var/lib/swupd/XXXXX/Manifest.MoM to exist (where XXXXX is the contents of /var/lib/swupd/version), be in the correct format etc. Add in package name completion for bundle-remove. This uses the contents of /usr/share/clear/bundles to get the list of installed bundles. It would be nice to use $(swupd bundle-list) but it aborts if it is not being run as root, so this means you can't have completion for "sudo swupd bundle-remove". TODO: Fix bundle completion if --path is specified. Signed-off-by: Icarus Sparry <icarus.w.sparry@intel.com>