mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-07 10:01:14 -03:00
create_manpage_completions.py: refactor: clean up parse_and_output_man_pages
This commit is contained in:
committed by
Johannes Altmanninger
parent
0d863378ea
commit
75f93a590e
@@ -916,7 +916,6 @@ def parse_and_output_man_pages(paths, output_directory, show_progress):
|
||||
# Get the "base" command, e.g. gcc.1.gz -> gcc
|
||||
man_file_name = os.path.basename(manpage_path)
|
||||
CMDNAME = man_file_name.split(".", 1)[0]
|
||||
output_file_name = CMDNAME + ".fish"
|
||||
|
||||
# Show progress if we're doing that
|
||||
if show_progress:
|
||||
@@ -929,10 +928,6 @@ def parse_and_output_man_pages(paths, output_directory, show_progress):
|
||||
sys.stdout.write("\r{0}\r".format(padded_progress_str))
|
||||
sys.stdout.flush()
|
||||
|
||||
if not WRITE_TO_STDOUT:
|
||||
# Compute the path that we would write to
|
||||
output_path = os.path.join(output_directory, output_file_name)
|
||||
|
||||
try:
|
||||
if parse_manpage_at_path(manpage_path, output_directory):
|
||||
successful_count += 1
|
||||
|
||||
Reference in New Issue
Block a user