]> arthur.barton.de Git - bup.git/commitdiff
cmd/ftp: don't do MacOS readline bindings on non-MacOS.
authorAvery Pennarun <apenwarr@gmail.com>
Wed, 22 Feb 2012 19:33:22 +0000 (14:33 -0500)
committerAvery Pennarun <apenwarr@gmail.com>
Wed, 22 Feb 2012 19:34:22 +0000 (14:34 -0500)
I thought it was harmless, but apparently it makes the 'b' command not work
on Linux machines.  Oops.

Thanks to Gabriel Filion and gernot on IRC for reporting this.

Signed-off-by: Avery Pennarun <apenwarr@gmail.com>
cmd/ftp-cmd.py

index 097ff2eb9de0a66c32090408a8798dc0d8245331..6c40dc37bc3bc87e52449d8fb21dcbfa74bf933d 100755 (executable)
@@ -144,7 +144,9 @@ else:
     if readline:
         readline.set_completer_delims(' \t\n\r/')
         readline.set_completer(completer)
-        readline.parse_and_bind('bind ^I rl_complete')
+        if platform.system() == 'Darwin':
+            # MacOS uses a slighly incompatible clone of libreadline
+            readline.parse_and_bind('bind ^I rl_complete')
         readline.parse_and_bind('tab: complete')
         init_readline_vars()
     lines = inputiter()