---
feature_story: FS_55_57_45_04
feature_title: enum selector
feature_status: TEST
---

This article describes how command line is interpreted
as "enum selector" implementation of FS_15_79_76_85 line processor.

The example uses the default config and demo data set (TD_63_37_05_36).

The command line tokens are translated to typed args.
A user keeps adding the typed `arg_value`-s with auto-completion
until all requited types unambiguously specify what to do:
    `[some_command] rw upstream goto amer`
TODO: add test case confirming the shown example
The order is (usually) not important.

If there is an ambiguity, auto-completion suggests possible options -
in this case, the missing option is `code_maturity` ("prod", "qa", "dev", ...):
    `[some_command] rw upstream goto amer prod`
TODO: add test case confirming the shown example

Each `arg_value` belongs to its own type (see :class:`ServicePropName`), for example:
*   "rw": `access_type`
*   "upstream": `flow_stage`
*   "amer": `geo_region`
*   "prod": `code_maturity`
These types are:
*   discrete (limited set of values) and
*   non-orthogonal (possible values of one type may affect/depend on already given values for another type).

The `prop_name` for the `prop_value` is determined in several attempts:

*   In case of `dictated_arg`-s, the `prop_name` is known by mapping from `arg_name` to `prop_name`.

*   If it is `offered_arg`, next unspecified `prop_name` is assumed, and its value set is searched for that value.

    This process is repeated for all subsequent `prop_name`-s in
    FS_31_70_49_15 `search_control` in order until the first `prop_name` with matching `prop_value` is found.

*   If `arg_value` is not in the value set for `prop_name`, then the value stays remaining (unrecognized).
