This only handles the options. I never found a good way to get a list of targets which would make it much more useful. But option completion alone is useful and it falls back to file completion so doesn't do any harm.