mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-11-13 21:15:15 +00:00
[misc] Fix zsh path argument completion (#14953)
Closes #14952 Authored by: matyb08
This commit is contained in:
@@ -18,6 +18,7 @@ def build_completion(opt_parser):
|
|||||||
for opt in group.option_list]
|
for opt in group.option_list]
|
||||||
opts_file = [opt for opt in opts if opt.metavar == 'FILE']
|
opts_file = [opt for opt in opts if opt.metavar == 'FILE']
|
||||||
opts_dir = [opt for opt in opts if opt.metavar == 'DIR']
|
opts_dir = [opt for opt in opts if opt.metavar == 'DIR']
|
||||||
|
opts_path = [opt for opt in opts if opt.metavar == 'PATH']
|
||||||
|
|
||||||
fileopts = []
|
fileopts = []
|
||||||
for opt in opts_file:
|
for opt in opts_file:
|
||||||
@@ -26,6 +27,12 @@ def build_completion(opt_parser):
|
|||||||
if opt._long_opts:
|
if opt._long_opts:
|
||||||
fileopts.extend(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 = []
|
diropts = []
|
||||||
for opt in opts_dir:
|
for opt in opts_dir:
|
||||||
if opt._short_opts:
|
if opt._short_opts:
|
||||||
|
|||||||
Reference in New Issue
Block a user