Skip to content
Snippets Groups Projects
Commit 370367ed authored by Leo Lung's avatar Leo Lung Committed by CQ bot account: commit-bot@chromium.org
Browse files

[component_index][locate] Add locate tool

Supports matching of exactly one component, or --list to match more than
one component.

CF-162 #comment

TEST=
fx run-test locate_integration_test

locate tiles_ctl
fuchsia-pkg://fuchsia.com/tiles_ctl#meta/tiles_ctl.cmx

locate ctl
fuchsia-pkg://fuchsia.com/stash_ctl#meta/stash_ctl.cmx
fuchsia-pkg://fuchsia.com/tiles_ctl#meta/tiles_ctl.cmx
...
Error: "ctl" matched more than one component. Try `locate --list` instead.

locate --list ctl
fuchsia-pkg://fuchsia.com/stash_ctl#meta/stash_ctl.cmx
fuchsia-pkg://fuchsia.com/tiles_ctl#meta/tiles_ctl.cmx
...

locate --list tiles_ctl
fuchsia-pkg://fuchsia.com/tiles_ctl#meta/tiles_ctl.cmx

locate leolung
Error: "leolung" did not match any components.

locate
locate foo bar
locate --list foo bar
locate --list
Usage: locate [--list] <search_keyword>

Locates the fuchsia-pkg URL of <search_keyword>.

Options:
  --list    Allows matching of more than one component.
Error: Unable to parse args.

locate rolldice
fuchsia-pkg://fuchsia.com/rolldice#meta/rolldice.cmx

run `locate rolldice`
+---+
|* *|
|* *|
|* *|
+---+

Change-Id: Iafa1cc048b2940967e08b3c4f244a1945b6bea00
parent 4c746ff0
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment