imperative icon indicating copy to clipboard operation
imperative copied to clipboard

[single-profile] Ability to "traverse" through the config file via the CLI

Open zFernand0 opened this issue 4 years ago • 1 comments

zowe config list profiles.lpar1.profiles.my_service.properties.port would be nice to have.

Maybe we can do something like:

if (property.indexOf(".") > 0) {
  for (const key of property.split(".")) {
    obj = (obj as any)[key];
    if (typeof obj !== "object")
      obj = { [key]: obj };
  }
} else {
  obj = (config.properties as any)[property];
}

instead of https://github.com/zowe/imperative/blob/5bb73720d066d5ab58f6be59c4a57d7975d89709/packages/imperative/src/config/cmd/list/list.handler.ts#L42

zFernand0 avatar Dec 08 '20 13:12 zFernand0