[misc] Fix zsh path argument completion (#14953)
Some checks failed
CodeQL / Analyze (python) (push) Has been cancelled
Core Tests / Core Tests (ubuntu-latest, 3.11) (push) Has been cancelled
Core Tests / Core Tests (ubuntu-latest, 3.12) (push) Has been cancelled
Core Tests / Core Tests (ubuntu-latest, 3.13) (push) Has been cancelled
Core Tests / Core Tests (ubuntu-latest, 3.14) (push) Has been cancelled
Core Tests / Core Tests (ubuntu-latest, pypy-3.11) (push) Has been cancelled
Core Tests / Core Tests (windows-latest, 3.10) (push) Has been cancelled
Core Tests / Core Tests (windows-latest, 3.11) (push) Has been cancelled
Core Tests / Core Tests (windows-latest, 3.12) (push) Has been cancelled
Core Tests / Core Tests (windows-latest, 3.13) (push) Has been cancelled
Core Tests / Core Tests (windows-latest, 3.14) (push) Has been cancelled
Core Tests / Core Tests (windows-latest, pypy-3.11) (push) Has been cancelled
Download Tests / Quick Download Tests (push) Has been cancelled
Download Tests / Full Download Tests (ubuntu-latest, 3.11) (push) Has been cancelled
Download Tests / Full Download Tests (ubuntu-latest, 3.12) (push) Has been cancelled
Download Tests / Full Download Tests (ubuntu-latest, 3.13) (push) Has been cancelled
Download Tests / Full Download Tests (ubuntu-latest, 3.14) (push) Has been cancelled
Download Tests / Full Download Tests (ubuntu-latest, pypy-3.11) (push) Has been cancelled
Download Tests / Full Download Tests (windows-latest, 3.10) (push) Has been cancelled
Download Tests / Full Download Tests (windows-latest, pypy-3.11) (push) Has been cancelled
Quick Test / Core Test (push) Has been cancelled
Quick Test / Code check (push) Has been cancelled
Release (master) / release (push) Has been cancelled
Release (master) / publish_pypi (push) Has been cancelled
Release (nightly) / check_nightly (push) Has been cancelled
Release (nightly) / release (push) Has been cancelled
Release (nightly) / publish_pypi (push) Has been cancelled
Challenge Tests / Challenge Tests (ubuntu-latest, 3.10) (push) Has been cancelled
Challenge Tests / Challenge Tests (ubuntu-latest, 3.11) (push) Has been cancelled
Challenge Tests / Challenge Tests (ubuntu-latest, 3.12) (push) Has been cancelled
Challenge Tests / Challenge Tests (ubuntu-latest, 3.13) (push) Has been cancelled
Challenge Tests / Challenge Tests (ubuntu-latest, 3.14) (push) Has been cancelled
Challenge Tests / Challenge Tests (ubuntu-latest, pypy-3.11) (push) Has been cancelled
Challenge Tests / Challenge Tests (windows-latest, 3.10) (push) Has been cancelled
Challenge Tests / Challenge Tests (windows-latest, 3.11) (push) Has been cancelled
Challenge Tests / Challenge Tests (windows-latest, 3.12) (push) Has been cancelled
Challenge Tests / Challenge Tests (windows-latest, 3.13) (push) Has been cancelled
Challenge Tests / Challenge Tests (windows-latest, 3.14) (push) Has been cancelled
Challenge Tests / Challenge Tests (windows-latest, pypy-3.11) (push) Has been cancelled

Closes #14952
Authored by: matyb08
This commit is contained in:
matyb08
2025-11-09 16:23:03 +01:00
committed by GitHub
parent 4b4223b436
commit c96e9291ab

View File

@@ -18,6 +18,7 @@ def build_completion(opt_parser):
for opt in group.option_list]
opts_file = [opt for opt in opts if opt.metavar == 'FILE']
opts_dir = [opt for opt in opts if opt.metavar == 'DIR']
opts_path = [opt for opt in opts if opt.metavar == 'PATH']
fileopts = []
for opt in opts_file:
@@ -26,6 +27,12 @@ def build_completion(opt_parser):
if opt._long_opts:
fileopts.extend(opt._long_opts)
for opt in opts_path:
if opt._short_opts:
fileopts.extend(opt._short_opts)
if opt._long_opts:
fileopts.extend(opt._long_opts)
diropts = []
for opt in opts_dir:
if opt._short_opts: