pdd’s Zsh completion dispatcher assumes the subcommand is always the second shell token. As a result, global options placed before the command break command-specific completion:
The dispatcher reads --local as though it were the subcommand, so it falls back to generic completion instead of invoking _pdd_sync. Normal completion such as pdd sync <Tab> continues to work.
Expected behavior: Zsh completion should find the first known PDD subcommand after skipping global flags and values for global options that take arguments. Both forms should provide sync-specific suggestions:
pdd sync <Tab>
pdd --local sync <Tab>
The fix updates prompts/pdd_completion_zsh.prompt, regenerates/updates pdd/pdd_completion.zsh, and adds regression coverage for --local and --context local before sync.
pdd’s Zsh completion dispatcher assumes the subcommand is always the second shell token. As a result, global options placed before the command break command-specific completion:The dispatcher reads
--localas though it were the subcommand, so it falls back to generic completion instead of invoking_pdd_sync. Normal completion such aspdd sync <Tab>continues to work.Expected behavior: Zsh completion should find the first known PDD subcommand after skipping global flags and values for global options that take arguments. Both forms should provide sync-specific suggestions:
The fix updates
prompts/pdd_completion_zsh.prompt, regenerates/updatespdd/pdd_completion.zsh, and adds regression coverage for--localand--context localbeforesync.