prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Incomplete help for: st2 action-alias match
  ```
  $ st2 action-alias match --help
  usage: st2 action-alias match [-t TOKEN] [--api-key API_KEY] [-j] [-y]
                                [-a ATTR [ATTR ...]] [-w WIDTH [WIDTH ...]]
                                command
  st2 action-alias match: error: too few arguments
  ```
  
  </issue>
  <code>
  [start of st2client/st2client/commands/action_alias.py]
  1 # Licensed to the StackStorm, Inc ('StackStorm') under one or more
  2 # contributor license agreements.  See the NOTICE file distributed with
  3 # this work for additional information regarding copyright ownership.
  4 # The ASF licenses this file to You under the Apache License, Version 2.0
  5 # (the "License"); you may not use this file except in compliance with
  6 # the License.  You may obtain a copy of the License at
  7 #
  8 #     http://www.apache.org/licenses/LICENSE-2.0
  9 #
  10 # Unless required by applicable law or agreed to in writing, software
  11 # distributed under the License is distributed on an "AS IS" BASIS,
  12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13 # See the License for the specific language governing permissions and
  14 # limitations under the License.
  15 
  16 from __future__ import absolute_import
  17 
  18 from st2client.models import core
  19 from st2client.models.action_alias import ActionAlias
  20 from st2client.models.action_alias import ActionAliasMatch
  21 from st2client.commands import resource
  22 from st2client.formatters import table
  23 
  24 
  25 __all__ = [
  26     'ActionAliasBranch',
  27     'ActionAliasMatchCommand',
  28     'ActionAliasExecuteCommand'
  29 ]
  30 
  31 
  32 class ActionAliasBranch(resource.ResourceBranch):
  33     def __init__(self, description, app, subparsers, parent_parser=None):
  34         super(ActionAliasBranch, self).__init__(
  35             ActionAlias, description, app, subparsers,
  36             parent_parser=parent_parser, read_only=False,
  37             commands={
  38                 'list': ActionAliasListCommand,
  39                 'get': ActionAliasGetCommand
  40             })
  41 
  42         self.commands['match'] = ActionAliasMatchCommand(
  43             self.resource, self.app, self.subparsers,
  44             add_help=False)
  45         self.commands['execute'] = ActionAliasExecuteCommand(
  46             self.resource, self.app, self.subparsers,
  47             add_help=False)
  48 
  49 
  50 class ActionAliasListCommand(resource.ContentPackResourceListCommand):
  51     display_attributes = ['ref', 'pack', 'description', 'enabled']
  52 
  53 
  54 class ActionAliasGetCommand(resource.ContentPackResourceGetCommand):
  55     display_attributes = ['all']
  56     attribute_display_order = ['id', 'ref', 'pack', 'name', 'description',
  57                                'enabled', 'action_ref', 'formats']
  58 
  59 
  60 class ActionAliasMatchCommand(resource.ResourceCommand):
  61     display_attributes = ['name', 'description']
  62 
  63     def __init__(self, resource, *args, **kwargs):
  64         super(ActionAliasMatchCommand, self).__init__(
  65             resource, 'match',
  66             'Get the list of %s that match the command text.' %
  67             resource.get_plural_display_name().lower(),
  68             *args, **kwargs)
  69 
  70         self.parser.add_argument('match_text',
  71                                  metavar='command',
  72                                  help=help)
  73         self.parser.add_argument('-h', '--help',
  74                                  action='store_true', dest='help',
  75                                  help='Print usage for the given action.')
  76         self.parser.add_argument('-a', '--attr', nargs='+',
  77                                  default=self.display_attributes,
  78                                  help=('List of attributes to include in the '
  79                                        'output. "all" will return all '
  80                                        'attributes.'))
  81         self.parser.add_argument('-w', '--width', nargs='+', type=int,
  82                                  default=None,
  83                                  help=('Set the width of columns in output.'))
  84 
  85     @resource.add_auth_token_to_kwargs_from_cli
  86     def run(self, args, **kwargs):
  87         alias_match = ActionAliasMatch()
  88         alias_match.command = args.match_text
  89 
  90         match, _ = self.manager.match(alias_match, **kwargs)
  91         return [match]
  92 
  93     def run_and_print(self, args, **kwargs):
  94         instances = self.run(args, **kwargs)
  95         self.print_output(instances, table.MultiColumnTable,
  96                           attributes=args.attr, widths=args.width,
  97                           json=args.json, yaml=args.yaml)
  98 
  99 
  100 class ActionAliasExecuteCommand(resource.ResourceCommand):
  101     display_attributes = ['name']
  102 
  103     def __init__(self, resource, *args, **kwargs):
  104         super(ActionAliasExecuteCommand, self).__init__(
  105             resource, 'execute',
  106             ('Execute the command text by finding a matching %s.' %
  107              resource.get_display_name().lower()), *args, **kwargs)
  108 
  109         self.parser.add_argument('command_text',
  110                                  metavar='command',
  111                                  help=help)
  112         self.parser.add_argument('-h', '--help',
  113                                  action='store_true', dest='help',
  114                                  help='Print usage for the given action.')
  115         self.parser.add_argument('-u', '--user', type=str, default=None,
  116                                  help='User under which to run the action (admins only).')
  117 
  118     @resource.add_auth_token_to_kwargs_from_cli
  119     def run(self, args, **kwargs):
  120         payload = core.Resource()
  121         payload.command = args.command_text
  122         payload.user = args.user
  123         payload.source_channel = 'cli'
  124 
  125         alias_execution_mgr = self.app.client.managers['ActionAliasExecution']
  126         execution = alias_execution_mgr.match_and_execute(payload)
  127         return execution
  128 
  129     def run_and_print(self, args, **kwargs):
  130         execution = self.run(args, **kwargs)
  131         print("Matching Action-alias: '%s'" % execution.actionalias['ref'])
  132         print("To get the results, execute:\n st2 execution get %s" %
  133               (execution.execution['id']))
  134
  [end of st2client/st2client/commands/action_alias.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/st2client/st2client/commands/action_alias.py b/st2client/st2client/commands/action_alias.py
  --- a/st2client/st2client/commands/action_alias.py
  +++ b/st2client/st2client/commands/action_alias.py
  @@ -41,10 +41,10 @@
   
           self.commands['match'] = ActionAliasMatchCommand(
               self.resource, self.app, self.subparsers,
  -            add_help=False)
  +            add_help=True)
           self.commands['execute'] = ActionAliasExecuteCommand(
               self.resource, self.app, self.subparsers,
  -            add_help=False)
  +            add_help=True)
   
   
   class ActionAliasListCommand(resource.ContentPackResourceListCommand):
  @@ -69,10 +69,8 @@
   
           self.parser.add_argument('match_text',
                                    metavar='command',
  -                                 help=help)
  -        self.parser.add_argument('-h', '--help',
  -                                 action='store_true', dest='help',
  -                                 help='Print usage for the given action.')
  +                                 help=('Get the list of %s that match the command text.' %
  +                                       resource.get_display_name().lower()))
           self.parser.add_argument('-a', '--attr', nargs='+',
                                    default=self.display_attributes,
                                    help=('List of attributes to include in the '
  @@ -108,10 +106,8 @@
   
           self.parser.add_argument('command_text',
                                    metavar='command',
  -                                 help=help)
  -        self.parser.add_argument('-h', '--help',
  -                                 action='store_true', dest='help',
  -                                 help='Print usage for the given action.')
  +                                 help=('Execute the command text by finding a matching %s.' %
  +                                       resource.get_display_name().lower()))
           self.parser.add_argument('-u', '--user', type=str, default=None,
                                    help='User under which to run the action (admins only).')
  
verification_info: {"golden_diff": "diff --git a/st2client/st2client/commands/action_alias.py b/st2client/st2client/commands/action_alias.py\n--- a/st2client/st2client/commands/action_alias.py\n+++ b/st2client/st2client/commands/action_alias.py\n@@ -41,10 +41,10 @@\n \n         self.commands['match'] = ActionAliasMatchCommand(\n             self.resource, self.app, self.subparsers,\n-            add_help=False)\n+            add_help=True)\n         self.commands['execute'] = ActionAliasExecuteCommand(\n             self.resource, self.app, self.subparsers,\n-            add_help=False)\n+            add_help=True)\n \n \n class ActionAliasListCommand(resource.ContentPackResourceListCommand):\n@@ -69,10 +69,8 @@\n \n         self.parser.add_argument('match_text',\n                                  metavar='command',\n-                                 help=help)\n-        self.parser.add_argument('-h', '--help',\n-                                 action='store_true', dest='help',\n-                                 help='Print usage for the given action.')\n+                                 help=('Get the list of %s that match the command text.' %\n+                                       resource.get_display_name().lower()))\n         self.parser.add_argument('-a', '--attr', nargs='+',\n                                  default=self.display_attributes,\n                                  help=('List of attributes to include in the '\n@@ -108,10 +106,8 @@\n \n         self.parser.add_argument('command_text',\n                                  metavar='command',\n-                                 help=help)\n-        self.parser.add_argument('-h', '--help',\n-                                 action='store_true', dest='help',\n-                                 help='Print usage for the given action.')\n+                                 help=('Execute the command text by finding a matching %s.' %\n+                                       resource.get_display_name().lower()))\n         self.parser.add_argument('-u', '--user', type=str, default=None,\n                                  help='User under which to run the action (admins only).')\n", "issue": "Incomplete help for: st2 action-alias match\n```\r\n$ st2 action-alias match --help\r\nusage: st2 action-alias match [-t TOKEN] [--api-key API_KEY] [-j] [-y]\r\n                              [-a ATTR [ATTR ...]] [-w WIDTH [WIDTH ...]]\r\n                              command\r\nst2 action-alias match: error: too few arguments\r\n```\n", "before_files": [{"content": "# Licensed to the StackStorm, Inc ('StackStorm') under one or more\n# contributor license agreements.  See the NOTICE file distributed with\n# this work for additional information regarding copyright ownership.\n# The ASF licenses this file to You under the Apache License, Version 2.0\n# (the \"License\"); you may not use this file except in compliance with\n# the License.  You may obtain a copy of the License at\n#\n#     http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nfrom __future__ import absolute_import\n\nfrom st2client.models import core\nfrom st2client.models.action_alias import ActionAlias\nfrom st2client.models.action_alias import ActionAliasMatch\nfrom st2client.commands import resource\nfrom st2client.formatters import table\n\n\n__all__ = [\n    'ActionAliasBranch',\n    'ActionAliasMatchCommand',\n    'ActionAliasExecuteCommand'\n]\n\n\nclass ActionAliasBranch(resource.ResourceBranch):\n    def __init__(self, description, app, subparsers, parent_parser=None):\n        super(ActionAliasBranch, self).__init__(\n            ActionAlias, description, app, subparsers,\n            parent_parser=parent_parser, read_only=False,\n            commands={\n                'list': ActionAliasListCommand,\n                'get': ActionAliasGetCommand\n            })\n\n        self.commands['match'] = ActionAliasMatchCommand(\n            self.resource, self.app, self.subparsers,\n            add_help=False)\n        self.commands['execute'] = ActionAliasExecuteCommand(\n            self.resource, self.app, self.subparsers,\n            add_help=False)\n\n\nclass ActionAliasListCommand(resource.ContentPackResourceListCommand):\n    display_attributes = ['ref', 'pack', 'description', 'enabled']\n\n\nclass ActionAliasGetCommand(resource.ContentPackResourceGetCommand):\n    display_attributes = ['all']\n    attribute_display_order = ['id', 'ref', 'pack', 'name', 'description',\n                               'enabled', 'action_ref', 'formats']\n\n\nclass ActionAliasMatchCommand(resource.ResourceCommand):\n    display_attributes = ['name', 'description']\n\n    def __init__(self, resource, *args, **kwargs):\n        super(ActionAliasMatchCommand, self).__init__(\n            resource, 'match',\n            'Get the list of %s that match the command text.' %\n            resource.get_plural_display_name().lower(),\n            *args, **kwargs)\n\n        self.parser.add_argument('match_text',\n                                 metavar='command',\n                                 help=help)\n        self.parser.add_argument('-h', '--help',\n                                 action='store_true', dest='help',\n                                 help='Print usage for the given action.')\n        self.parser.add_argument('-a', '--attr', nargs='+',\n                                 default=self.display_attributes,\n                                 help=('List of attributes to include in the '\n                                       'output. \"all\" will return all '\n                                       'attributes.'))\n        self.parser.add_argument('-w', '--width', nargs='+', type=int,\n                                 default=None,\n                                 help=('Set the width of columns in output.'))\n\n    @resource.add_auth_token_to_kwargs_from_cli\n    def run(self, args, **kwargs):\n        alias_match = ActionAliasMatch()\n        alias_match.command = args.match_text\n\n        match, _ = self.manager.match(alias_match, **kwargs)\n        return [match]\n\n    def run_and_print(self, args, **kwargs):\n        instances = self.run(args, **kwargs)\n        self.print_output(instances, table.MultiColumnTable,\n                          attributes=args.attr, widths=args.width,\n                          json=args.json, yaml=args.yaml)\n\n\nclass ActionAliasExecuteCommand(resource.ResourceCommand):\n    display_attributes = ['name']\n\n    def __init__(self, resource, *args, **kwargs):\n        super(ActionAliasExecuteCommand, self).__init__(\n            resource, 'execute',\n            ('Execute the command text by finding a matching %s.' %\n             resource.get_display_name().lower()), *args, **kwargs)\n\n        self.parser.add_argument('command_text',\n                                 metavar='command',\n                                 help=help)\n        self.parser.add_argument('-h', '--help',\n                                 action='store_true', dest='help',\n                                 help='Print usage for the given action.')\n        self.parser.add_argument('-u', '--user', type=str, default=None,\n                                 help='User under which to run the action (admins only).')\n\n    @resource.add_auth_token_to_kwargs_from_cli\n    def run(self, args, **kwargs):\n        payload = core.Resource()\n        payload.command = args.command_text\n        payload.user = args.user\n        payload.source_channel = 'cli'\n\n        alias_execution_mgr = self.app.client.managers['ActionAliasExecution']\n        execution = alias_execution_mgr.match_and_execute(payload)\n        return execution\n\n    def run_and_print(self, args, **kwargs):\n        execution = self.run(args, **kwargs)\n        print(\"Matching Action-alias: '%s'\" % execution.actionalias['ref'])\n        print(\"To get the results, execute:\\n st2 execution get %s\" %\n              (execution.execution['id']))\n", "path": "st2client/st2client/commands/action_alias.py"}]}