I have a number of commands that take other commands as parameters. Not just the command name, but the full command line.
Obvious examples are sudo
and ssh
, as in:
sudo chown bob /tmp/a_file_for_bob
ssh bob@localhost mv /tmp/a_file_for_bob my_copied_file
In both cases, I would like to be able to do completion of the subcommands (chown
and cp
) based on their own completion rules.
The completion
command “list” option “c” allows me to complete chown
and mv
as commands, but is there any way to affect completion of the parameters? (other than somehow embedding the rest of the completions in the completion of one command.)