Explorar o código

Add support for completing "-" in names. Fixes #218

Mike Naberezny %!s(int64=11) %!d(string=hai) anos
pai
achega
cfef44efaa
Modificáronse 2 ficheiros con 4 adicións e 0 borrados
  1. 3 0
      CHANGES.txt
  2. 1 0
      supervisor/supervisorctl.py

+ 3 - 0
CHANGES.txt

@@ -38,6 +38,9 @@
   name like "group:*" would cause a 500 Internal Server Error rather than
   name like "group:*" would cause a 500 Internal Server Error rather than
   returning a BAD_NAME fault.
   returning a BAD_NAME fault.
 
 
+- Tab completion in ``supervisorctl`` has been improved and now works for
+  more cases.  Thanks to Mathieu Longtin for the initial patch.
+
 3.0 (2013-07-30)
 3.0 (2013-07-30)
 ----------------
 ----------------
 
 

+ 1 - 0
supervisor/supervisorctl.py

@@ -1161,6 +1161,7 @@ def main(args=None, options=None):
             import readline
             import readline
             delims = readline.get_completer_delims()
             delims = readline.get_completer_delims()
             delims = delims.replace(':', '') # "group:process" as one word
             delims = delims.replace(':', '') # "group:process" as one word
+            delims = delims.replace('-', '') # names with "-" as one word
             readline.set_completer_delims(delims)
             readline.set_completer_delims(delims)
 
 
             if options.history_file:
             if options.history_file: