sifive / wit

Workspace Integration Tool
Apache License 2.0
23 stars 13 forks source link

Optionally limit 'wit inspect' to subtrees #232

Open nategraff-sifive opened 4 years ago

nategraff-sifive commented 4 years ago

When inspecting the dependency graph of a workspace, it would be helpful to limit the scope of the inspect command to the subtree under certain packages:

usage: wit inspect [-h] [--tree | --dot] [PACKAGE [PACKAGE [...]]]

optional arguments:
  -h, --help  show this help message and exit
  --tree
  --dot
  PACKAGE     Limit to the subtree under the given package(s)

For example:

workspace/
  a/
  b/
  c/
$ wit inspect --tree
└─a::abcdef0
   ├─b::e9e997a9
   │  └─c::2232f4
   └─c::2232f4
$ wit inspect --tree b
└─b::e9e997a9
   └─c::2232f4