prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  xoreutils: echo fails with KeyError: 'help'
  Any `echo` invocation fails:
  
  ```shell
  $ $XONSH_SHOW_TRACEBACK = True
  $ echo
  xonsh: To log full traceback to a file set: $XONSH_TRACEBACK_LOGFILE = <filename>
  Traceback (most recent call last):
    File "/usr/local/lib/python3.6/site-packages/xonsh/__amalgam__.py", line 13061, in run
      r = self.f(self.args, sp_stdin, sp_stdout, sp_stderr, spec)
    File "/usr/local/lib/python3.6/site-packages/xonsh/__amalgam__.py", line 12896, in proxy_four
      return f(args, stdin, stdout, stderr)
    File "/usr/local/lib/python3.6/site-packages/xonsh/xoreutils/echo.py", line 9, in echo
      if opts['help']:
  KeyError: 'help'
  $ echo foo
  xonsh: To log full traceback to a file set: $XONSH_TRACEBACK_LOGFILE = <filename>
  Traceback (most recent call last):
    File "/usr/local/lib/python3.6/site-packages/xonsh/__amalgam__.py", line 13061, in run
      r = self.f(self.args, sp_stdin, sp_stdout, sp_stderr, spec)
    File "/usr/local/lib/python3.6/site-packages/xonsh/__amalgam__.py", line 12896, in proxy_four
      return f(args, stdin, stdout, stderr)
    File "/usr/local/lib/python3.6/site-packages/xonsh/xoreutils/echo.py", line 9, in echo
      if opts['help']:
  KeyError: 'help'
  $ echo "foo"
  xonsh: To log full traceback to a file set: $XONSH_TRACEBACK_LOGFILE = <filename>
  Traceback (most recent call last):
    File "/usr/local/lib/python3.6/site-packages/xonsh/__amalgam__.py", line 13061, in run
      r = self.f(self.args, sp_stdin, sp_stdout, sp_stderr, spec)
    File "/usr/local/lib/python3.6/site-packages/xonsh/__amalgam__.py", line 12896, in proxy_four
      return f(args, stdin, stdout, stderr)
    File "/usr/local/lib/python3.6/site-packages/xonsh/xoreutils/echo.py", line 9, in echo
      if opts['help']:
  KeyError: 'help'
  ```
  
  Obviously, the problem is that `help` is looked up but missing: http://xon.sh/_modules/xonsh/xoreutils/echo.html#echo
  
  </issue>
  <code>
  [start of xonsh/xoreutils/echo.py]
  1 """Implements a simple echo command for xonsh."""
  2 
  3 
  4 def echo(args, stdin, stdout, stderr):
  5     """A simple echo command."""
  6     opts = _echo_parse_args(args)
  7     if opts is None:
  8         return
  9     if opts['help']:
  10         print(ECHO_HELP, file=stdout)
  11         return 0
  12     ender = opts['end']
  13     args = map(str, args)
  14     if opts['escapes']:
  15         args = map(lambda x: x.encode().decode('unicode_escape'), args)
  16     print(*args, end=ender, file=stdout)
  17 
  18 
  19 def _echo_parse_args(args):
  20     out = {'escapes': False, 'end': '\n'}
  21     if '-e' in args:
  22         args.remove('-e')
  23         out['escapes'] = True
  24     if '-E' in args:
  25         args.remove('-E')
  26         out['escapes'] = False
  27     if '-n' in args:
  28         args.remove('-n')
  29         out['end'] = ''
  30     if '-h' in args or '--help' in args:
  31         out['help'] = True
  32     return out
  33 
  34 
  35 ECHO_HELP = """Usage: echo [OPTIONS]... [STRING]...
  36 Echo the STRING(s) to standard output.
  37 
  38   -n             do not include the trailing newline
  39   -e             enable interpretation of backslash escapes
  40   -E             disable interpretation of backslash escapes (default)
  41   -h  --help     display this message and exit
  42 
  43 This version of echo was written in Python for the xonsh project: http://xon.sh
  44 Based on echo from GNU coreutils: http://www.gnu.org/software/coreutils/"""
  45
  [end of xonsh/xoreutils/echo.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/xonsh/xoreutils/echo.py b/xonsh/xoreutils/echo.py
  --- a/xonsh/xoreutils/echo.py
  +++ b/xonsh/xoreutils/echo.py
  @@ -17,7 +17,7 @@
   
   
   def _echo_parse_args(args):
  -    out = {'escapes': False, 'end': '\n'}
  +    out = {'escapes': False, 'end': '\n', 'help': False}
       if '-e' in args:
           args.remove('-e')
           out['escapes'] = True
  
verification_info: {"golden_diff": "diff --git a/xonsh/xoreutils/echo.py b/xonsh/xoreutils/echo.py\n--- a/xonsh/xoreutils/echo.py\n+++ b/xonsh/xoreutils/echo.py\n@@ -17,7 +17,7 @@\n \n \n def _echo_parse_args(args):\n-    out = {'escapes': False, 'end': '\\n'}\n+    out = {'escapes': False, 'end': '\\n', 'help': False}\n     if '-e' in args:\n         args.remove('-e')\n         out['escapes'] = True\n", "issue": "xoreutils: echo fails with KeyError: 'help'\nAny `echo` invocation fails:\r\n\r\n```shell\r\n$ $XONSH_SHOW_TRACEBACK = True\r\n$ echo\r\nxonsh: To log full traceback to a file set: $XONSH_TRACEBACK_LOGFILE = <filename>\r\nTraceback (most recent call last):\r\n  File \"/usr/local/lib/python3.6/site-packages/xonsh/__amalgam__.py\", line 13061, in run\r\n    r = self.f(self.args, sp_stdin, sp_stdout, sp_stderr, spec)\r\n  File \"/usr/local/lib/python3.6/site-packages/xonsh/__amalgam__.py\", line 12896, in proxy_four\r\n    return f(args, stdin, stdout, stderr)\r\n  File \"/usr/local/lib/python3.6/site-packages/xonsh/xoreutils/echo.py\", line 9, in echo\r\n    if opts['help']:\r\nKeyError: 'help'\r\n$ echo foo\r\nxonsh: To log full traceback to a file set: $XONSH_TRACEBACK_LOGFILE = <filename>\r\nTraceback (most recent call last):\r\n  File \"/usr/local/lib/python3.6/site-packages/xonsh/__amalgam__.py\", line 13061, in run\r\n    r = self.f(self.args, sp_stdin, sp_stdout, sp_stderr, spec)\r\n  File \"/usr/local/lib/python3.6/site-packages/xonsh/__amalgam__.py\", line 12896, in proxy_four\r\n    return f(args, stdin, stdout, stderr)\r\n  File \"/usr/local/lib/python3.6/site-packages/xonsh/xoreutils/echo.py\", line 9, in echo\r\n    if opts['help']:\r\nKeyError: 'help'\r\n$ echo \"foo\"\r\nxonsh: To log full traceback to a file set: $XONSH_TRACEBACK_LOGFILE = <filename>\r\nTraceback (most recent call last):\r\n  File \"/usr/local/lib/python3.6/site-packages/xonsh/__amalgam__.py\", line 13061, in run\r\n    r = self.f(self.args, sp_stdin, sp_stdout, sp_stderr, spec)\r\n  File \"/usr/local/lib/python3.6/site-packages/xonsh/__amalgam__.py\", line 12896, in proxy_four\r\n    return f(args, stdin, stdout, stderr)\r\n  File \"/usr/local/lib/python3.6/site-packages/xonsh/xoreutils/echo.py\", line 9, in echo\r\n    if opts['help']:\r\nKeyError: 'help'\r\n```\r\n\r\nObviously, the problem is that `help` is looked up but missing: http://xon.sh/_modules/xonsh/xoreutils/echo.html#echo\n", "before_files": [{"content": "\"\"\"Implements a simple echo command for xonsh.\"\"\"\n\n\ndef echo(args, stdin, stdout, stderr):\n    \"\"\"A simple echo command.\"\"\"\n    opts = _echo_parse_args(args)\n    if opts is None:\n        return\n    if opts['help']:\n        print(ECHO_HELP, file=stdout)\n        return 0\n    ender = opts['end']\n    args = map(str, args)\n    if opts['escapes']:\n        args = map(lambda x: x.encode().decode('unicode_escape'), args)\n    print(*args, end=ender, file=stdout)\n\n\ndef _echo_parse_args(args):\n    out = {'escapes': False, 'end': '\\n'}\n    if '-e' in args:\n        args.remove('-e')\n        out['escapes'] = True\n    if '-E' in args:\n        args.remove('-E')\n        out['escapes'] = False\n    if '-n' in args:\n        args.remove('-n')\n        out['end'] = ''\n    if '-h' in args or '--help' in args:\n        out['help'] = True\n    return out\n\n\nECHO_HELP = \"\"\"Usage: echo [OPTIONS]... [STRING]...\nEcho the STRING(s) to standard output.\n\n  -n             do not include the trailing newline\n  -e             enable interpretation of backslash escapes\n  -E             disable interpretation of backslash escapes (default)\n  -h  --help     display this message and exit\n\nThis version of echo was written in Python for the xonsh project: http://xon.sh\nBased on echo from GNU coreutils: http://www.gnu.org/software/coreutils/\"\"\"\n", "path": "xonsh/xoreutils/echo.py"}]}