diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-05 09:06:11 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-05 09:06:11 +0000 |
commit | fd5a06560caab95c71a2e2e805efa8d0f3a696a0 (patch) | |
tree | e1c600b8612bc4b301e2f51b875fcd835c5008cc /devscripts/zsh-completion.py | |
parent | Releasing progress-linux version 2024.05.27-1~progress7.99u1. (diff) | |
download | yt-dlp-fd5a06560caab95c71a2e2e805efa8d0f3a696a0.tar.xz yt-dlp-fd5a06560caab95c71a2e2e805efa8d0f3a696a0.zip |
Merging upstream version 2024.07.01.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-x | devscripts/zsh-completion.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/devscripts/zsh-completion.py b/devscripts/zsh-completion.py index 267af5f..8e190c0 100755 --- a/devscripts/zsh-completion.py +++ b/devscripts/zsh-completion.py @@ -9,15 +9,15 @@ sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) import yt_dlp -ZSH_COMPLETION_FILE = "completions/zsh/_yt-dlp" -ZSH_COMPLETION_TEMPLATE = "devscripts/zsh-completion.in" +ZSH_COMPLETION_FILE = 'completions/zsh/_yt-dlp' +ZSH_COMPLETION_TEMPLATE = 'devscripts/zsh-completion.in' def build_completion(opt_parser): opts = [opt for group in opt_parser.option_groups 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_file = [opt for opt in opts if opt.metavar == 'FILE'] + opts_dir = [opt for opt in opts if opt.metavar == 'DIR'] fileopts = [] for opt in opts_file: @@ -38,11 +38,11 @@ def build_completion(opt_parser): with open(ZSH_COMPLETION_TEMPLATE) as f: template = f.read() - template = template.replace("{{fileopts}}", "|".join(fileopts)) - template = template.replace("{{diropts}}", "|".join(diropts)) - template = template.replace("{{flags}}", " ".join(flags)) + template = template.replace('{{fileopts}}', '|'.join(fileopts)) + template = template.replace('{{diropts}}', '|'.join(diropts)) + template = template.replace('{{flags}}', ' '.join(flags)) - with open(ZSH_COMPLETION_FILE, "w") as f: + with open(ZSH_COMPLETION_FILE, 'w') as f: f.write(template) |