Skip to content
Browse files

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 <apenwarr@gmail.com>
  • Loading branch information...
1 parent 00a4b07 commit 1b740a01aa0833b1b27c904ba65bfd67caf7a3b8 @apenwarr committed Feb 22, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 cmd/ftp-cmd.py
View
4 cmd/ftp-cmd.py
@@ -144,7 +144,9 @@ def completer(text, state):
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()

0 comments on commit 1b740a0

Please sign in to comment.
Something went wrong with that request. Please try again.