mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-04 16:34:47 +01:00
Support triple quotes. RegEx craziness.
This commit is contained in:
parent
c703315f36
commit
14d818b3c5
1 changed files with 3 additions and 1 deletions
|
@ -277,7 +277,9 @@ def complete_path(prefix, line, start, end, ctx, cdpath=True):
|
|||
return paths, lprefix
|
||||
|
||||
|
||||
RE_UNQUOTE = re.compile("""(?:[rub](?P<q1>["'])|(?P<q2>["']?))(.+)(?:(?P=q1)|(?P=q2))$""")
|
||||
RE_UNQUOTE = re.compile("""(?:[r](?P<raw>(?P<quotes>"[^"]|'[^']|\"""|'''))|"""
|
||||
"""(?P<normal>(?P=quotes)?))"""
|
||||
"""(?P<unquoted>.+)(?:(?P=raw)|(?P=normal))$""")
|
||||
|
||||
|
||||
def complete_dir(prefix, line, start, end, ctx, cdpath=False):
|
||||
|
|
Loading…
Add table
Reference in a new issue