From: Avery Pennarun Date: Wed, 22 Feb 2012 19:33:22 +0000 (-0500) Subject: cmd/ftp: don't do MacOS readline bindings on non-MacOS. X-Git-Tag: bup-0.25-rc2~168 X-Git-Url: https://arthur.barton.de/gitweb/?a=commitdiff_plain;h=1b740a01aa0833b1b27c904ba65bfd67caf7a3b8;p=bup.git cmd/ftp: don't do MacOS readline bindings on non-MacOS. 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 --- diff --git a/cmd/ftp-cmd.py b/cmd/ftp-cmd.py index 097ff2e..6c40dc3 100755 --- a/cmd/ftp-cmd.py +++ b/cmd/ftp-cmd.py @@ -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()