diff --git a/src/calibre/linux.py b/src/calibre/linux.py index 17b55cbe41..841e0b296d 100644 --- a/src/calibre/linux.py +++ b/src/calibre/linux.py @@ -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')