From: Avery Pennarun Date: Thu, 19 Jan 2012 23:36:13 +0000 (-0800) Subject: cmd/ftp: fix tab completion on MacOS. X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=00a4b07710adc65111011946b91b56c57ab34916;p=packages%2Fb%2Fbup.git cmd/ftp: fix tab completion on MacOS. MacOS doesn't use the "real" readline, and the clone it uses is slightly incompatible in its bindings. Just bind both and it seems to work on both MacOS and Linux. Signed-off-by: Avery Pennarun --- diff --git a/cmd/ftp-cmd.py b/cmd/ftp-cmd.py index 62f2cbc..097ff2e 100755 --- a/cmd/ftp-cmd.py +++ b/cmd/ftp-cmd.py @@ -144,7 +144,8 @@ else: if readline: readline.set_completer_delims(' \t\n\r/') readline.set_completer(completer) - readline.parse_and_bind("tab: complete") + readline.parse_and_bind('bind ^I rl_complete') + readline.parse_and_bind('tab: complete') init_readline_vars() lines = inputiter()