I am trying to write a zstyle ":completion:*" or similar rule that completes command names upon tab completion, similar to the pre-defined rules for commands like nice, nohup, exec, or sudo.
The commands in this case are those for MPI programs; for example, let's say that
Code:
mpiexec -n 4 my_[TAB]
would expand to
Code:
mpiexec -n 4 my_program
assuming my_program existed and could be found in the current hash table from $PATH.
I tried
Code:
compdef "_precommand" mpiexec
but that only completes commands if you leave out the "-n 4" in the above example.
I'm hoping it's something like,
Code:
zstyle ":completion:*:mpiexec:argument-3:" commands
Thanks!