Fix #1736313 [zsh completion does not build reproducibly](https://bugs.launchpad.net/calibre/+bug/1736313)

This commit is contained in:
Kovid Goyal 2017-12-05 11:00:58 +05:30
parent 631ca6393e
commit 9bd2332d2c
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -329,7 +329,7 @@ class ZshCompleter(object): # {{{
'--input-encoding' not in o._long_opts]
if not opts:
continue
opts = '\\\n '.join(tuple(self.get_options(opts)))
opts = '\\\n '.join(tuple(sorted(self.get_options(opts))))
w('\n%s() {'%(func%fmt))
w('\n _arguments -s \\\n ' + opts)
w('\n}\n')