mirror of
https://github.com/mikf/gallery-dl.git
synced 2024-11-22 10:42:34 +01:00
let zsh completion immediately suggest cmdline options
instead of expecting an URL and trying to complete it.
This commit is contained in:
parent
c28db7a6ea
commit
74494b43d3
@ -7,7 +7,7 @@
|
|||||||
# it under the terms of the GNU General Public License version 2 as
|
# it under the terms of the GNU General Public License version 2 as
|
||||||
# published by the Free Software Foundation.
|
# published by the Free Software Foundation.
|
||||||
|
|
||||||
"""Generate bash completion script from gallery-dl's argument parser"""
|
"""Generate zsh completion script from gallery-dl's argument parser"""
|
||||||
|
|
||||||
import util
|
import util
|
||||||
from gallery_dl import option
|
from gallery_dl import option
|
||||||
@ -20,8 +20,7 @@ typeset -A opt_args
|
|||||||
|
|
||||||
local rc=1
|
local rc=1
|
||||||
_arguments -C -S \\
|
_arguments -C -S \\
|
||||||
%(opts)s \\
|
%(opts)s && rc=0
|
||||||
'*:URL:_urls' && rc=0
|
|
||||||
|
|
||||||
return rc
|
return rc
|
||||||
"""
|
"""
|
||||||
|
Loading…
Reference in New Issue
Block a user