MCPcopy Create free account
hub / github.com/Keeper-Security/Commander / expand_cmd_args

Function expand_cmd_args

keepercommander/commands/base.py:685–698  ·  view source on GitHub ↗
(args, envvars, pattern=parameter_pattern)

Source from the content-addressed store, hash-verified

683
684
685def expand_cmd_args(args, envvars, pattern=parameter_pattern):
686 pos = 0
687 while True:
688 m = pattern.search(args, pos)
689 if not m:
690 break
691 p = m.group(1)
692 if p in envvars:
693 pv = envvars[p]
694 args = args[:m.start()] + pv + args[m.end():]
695 pos = m.start() + len(pv)
696 else:
697 pos = m.end() + 1
698 return args
699
700
701def normalize_output_param(args: str) -> str:

Callers 5

execute_argsMethod · 0.85
execute_argsMethod · 0.85
execute_argsMethod · 0.85
execute_argsMethod · 0.85
execute_argsMethod · 0.85

Calls 2

searchMethod · 0.80
startMethod · 0.45

Tested by

no test coverage detected