mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 12:53:13 +00:00
Fix "UNINDENT ..." junk in manpage completions
Problem with Type2ManParser before: complete -c xcode-select -s h -l help --description 'Prints the usage message. UNINDENT NDENT 0. 0.' after: complete -c xcode-select -s h -l help --description 'Prints the usage message.'
This commit is contained in:
parent
bb6ce9d142
commit
d895f876b4
1 changed files with 3 additions and 2 deletions
|
@ -363,7 +363,7 @@ class Type2ManParser(ManParser):
|
|||
|
||||
options_section = options_section_matched.group(1)
|
||||
|
||||
options_parts_regex = re.compile("\.[I|T]P( \d+(\.\d)?i?)?(.*?)\.[I|T]P", re.DOTALL)
|
||||
options_parts_regex = re.compile("\.[I|T]P( \d+(\.\d)?i?)?(.*?)\.([I|T]P|UNINDENT)", re.DOTALL)
|
||||
options_matched = re.search(options_parts_regex, options_section)
|
||||
add_diagnostic('Command is %r' % CMDNAME)
|
||||
|
||||
|
@ -774,7 +774,8 @@ def parse_manpage_at_path(manpage_path, output_directory):
|
|||
|
||||
# Output the magic word Autogenerated so we can tell if we can overwrite this
|
||||
built_command_output.insert(1, "# Autogenerated from man page " + manpage_path)
|
||||
built_command_output.insert(2, "# using " + parser.__class__.__name__)
|
||||
# built_command_output.insert(2, "# using " + parser.__class__.__name__) # XXX MISATTRIBUTES THE CULPABILE PARSER! Was really using Type2 but reporting TypeDeroffManParser
|
||||
|
||||
for line in built_command_output:
|
||||
output_file.write(line)
|
||||
output_file.write('\n')
|
||||
|
|
Loading…
Reference in a new issue