def resolve_command(self, ctx, args):
        cmd_name = make_str(args[0])

        if cmd_name in self.get_configured_aliases():
            if cmd_name in self.list_commands(ctx):
                # Shadowing of existing commands is explicitly disabled.
                click.secho('"{}" references an existing command. I am '
                            'ignoring the alias definition.'.format(cmd_name),
                            fg='yellow')
            else:
                # If the command references a configured alias, retrieve it
                # from the configuration.
                alias = self.get_config().get('alias', cmd_name)
                args = args[1:]
                if alias.startswith('!'):
                    cmd = SubprocessExecuter('')
                    additional_args = ' '.join(shlex.quote(a) for a in args)
                    return '', cmd, [alias[1:] + ' ' + additional_args]
                else:
                    args = shlex.split(alias) + args

        return super().resolve_command(ctx, args)
dataset/ETHPy150Open GaretJax/lancet/lancet/cli.py/ConfigurableLoader.resolve_command/original