[CalendarServer-dev] ubuntu baseshell

Atli Thorbjornsson atlithorn at gmail.com
Fri Apr 18 14:09:57 PDT 2014


Hi guys, found a bug while running the caldavclientlibrary on ubuntu. Tab
completion was broken and what's worse was that I was unable to hit 'b',
couldn't event paste it.

Found another plighted soul here
http://stackoverflow.com/questions/7124035/in-python-shell-b-letter-does-not-work-what-the

Please find attached svn diff output with my fix.

Atli.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-dev/attachments/20140418/30da8628/attachment.html>
-------------- next part --------------
Index: caldavclientlibrary/browser/baseshell.py
===================================================================
--- caldavclientlibrary/browser/baseshell.py	(revision 13316)
+++ caldavclientlibrary/browser/baseshell.py	(working copy)
@@ -19,6 +19,7 @@
 from caldavclientlibrary.browser.command import UnknownCommand
 from caldavclientlibrary.protocol.url import URL
 from caldavclientlibrary.protocol.webdav.definitions import davxml
+import sys
 import os
 import readline
 import traceback
@@ -70,7 +71,10 @@
 
         old_completer = readline.get_completer()
         readline.set_completer(self.complete)
-        readline.parse_and_bind("bind ^I rl_complete")
+        if sys.platform == 'darwin' and sys.version_info[0] == 2:
+            readline.parse_and_bind("bind ^I rl_complete")
+        else:
+            readline.parse_and_bind("tab: complete")
 
         while True:
             cmdline = raw_input("%s > " % (self.prefix,))


More information about the calendarserver-dev mailing list