Currently the design decision is that all options must go before the command name. But since shell completion script uses only the current and the previous words, it cannot tell if the command is already entered or not. That's why it suggests all options after, say, pack build pack.ipkg --<cursor here> .
I'm not an expert on how shell completion works, and I don't know if we can get more previous strings before the current one, but if we can, we definitely should change the algorithm of completion to take this into account.
Currently the design decision is that all options must go before the command name. But since shell completion script uses only the current and the previous words, it cannot tell if the command is already entered or not. That's why it suggests all options after, say,
pack build pack.ipkg --<cursor here>
.I'm not an expert on how shell completion works, and I don't know if we can get more previous strings before the current one, but if we can, we definitely should change the algorithm of completion to take this into account.