Dvc: scripts: Zsh completion should work with subcommands

Created on 24 Apr 2019  路  4Comments  路  Source: iterative/dvc

For example: dvc metrics show <tab>.

The way to support this would be to modify the way we parse our arguments to support subcommands https://github.com/iterative/dvc/blob/dd8598e53ea03aaa7554c6ebf8fa7fe37baffc31/scripts/completion/dvc.zsh#L231-L240

enhancement p3-nice-to-have

All 4 comments

I just want to add that specifically for dvc cache dir not all the $_dvc_global_options exist (-q, and -v specifically), while for all the other subcommands I think they do. Something to consider. (Maybe they should be added to the subcommand?)

@jorgeorpinel Good catch! Indeed, we've missed those there. Looks like we just need to use parents=[parent_parser, parent_config_parser] in https://github.com/iterative/dvc/blob/master/dvc/command/cache.py#L46 .

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gregfriedland picture gregfriedland  路  3Comments

GildedHonour picture GildedHonour  路  3Comments

TezRomacH picture TezRomacH  路  3Comments

analystanand picture analystanand  路  3Comments

dmpetrov picture dmpetrov  路  3Comments