(self, params, args, **kwargs)
| 750 | raise NotImplementedError() |
| 751 | |
| 752 | def execute_args(self, params, args, **kwargs): |
| 753 | # type: (Command, KeeperParams, str, ...) -> Any |
| 754 | |
| 755 | global parameter_pattern |
| 756 | try: |
| 757 | d = {} |
| 758 | d.update(kwargs) |
| 759 | self.extra_parameters = '' |
| 760 | parser = self._get_parser_safe() |
| 761 | envvars = params.environment_variables |
| 762 | args = '' if args is None else args |
| 763 | if parser: |
| 764 | # Update prog to match alias name (e.g., 'find-password' instead of 'clipboard-copy') |
| 765 | alias_cmd = d.get('command') |
| 766 | if alias_cmd and alias_cmd != parser.prog: |
| 767 | parser.prog = alias_cmd |
| 768 | args = expand_cmd_args(args, envvars) |
| 769 | args = normalize_output_param(args) |
| 770 | if self.support_extra_parameters(): |
| 771 | opts, extra_args = parser.parse_known_args(shlex.split(args)) |
| 772 | if extra_args: |
| 773 | self.extra_parameters = ' '.join(extra_args) |
| 774 | else: |
| 775 | opts = parser.parse_args(shlex.split(args)) |
| 776 | d.update(opts.__dict__) |
| 777 | |
| 778 | return self.execute(params, **d) |
| 779 | except ParseError as e: |
| 780 | logging.error(e) |
| 781 | |
| 782 | def support_extra_parameters(self): # type: () -> bool |
| 783 | return False |
no test coverage detected