summaryrefslogtreecommitdiffstats
path: root/TOOLS/zsh.pl
diff options
context:
space:
mode:
Diffstat (limited to 'TOOLS/zsh.pl')
-rwxr-xr-xTOOLS/zsh.pl6
1 files changed, 4 insertions, 2 deletions
diff --git a/TOOLS/zsh.pl b/TOOLS/zsh.pl
index 306e9765b7..f4491e3971 100755
--- a/TOOLS/zsh.pl
+++ b/TOOLS/zsh.pl
@@ -4,11 +4,14 @@
use strict;
use warnings;
+use warnings FATAL => 'uninitialized';
my $mpv = $ARGV[0] || 'mpv';
my @opts = parse_main_opts('--list-options', '^ (\-\-[^\s\*]*)\*?\s*(.*)');
+die "Couldn't find any options" unless (@opts);
+
my @ao = parse_opts('--ao=help', '^ ([^\s\:]*)\s*: (.*)');
my @vo = parse_opts('--vo=help', '^ ([^\s\:]*)\s*: (.*)');
@@ -141,8 +144,7 @@ $runtime_completions
local expl
_tags files urls
while _tags; do
- _requested files expl 'media file' _files -g \\
- "*.(#i)(asf|asx|avi|f4v|flac|flv|m1v|m2p|m2v|m4v|mjpg|mka|mkv|mov|mp3|mp4|mpe|mpeg|mpg|ogg|ogm|ogv|opus|qt|rm|ts|vob|wav|webm|wma|wmv|wv)(-.)" && rc=0
+ _requested files expl 'media file' _files && rc=0
if _requested urls; then
while _next_label urls expl URL; do
_urls "\$expl[@]" && rc=0