The cd command in smbclient will not do pathname completion across a backslash (\)

Richard Sharpe realrichardsharpe at gmail.com
Fri Sep 18 20:38:19 UTC 2015


Hi folks,

I noticed this annoying thing in the smbclient cd command.

It does completion, but will not complete across a backslash.

There are several problems here. The first is addressed by the following patch:

--- a/libcli/smbreadline/smbreadline.c
+++ b/libcli/smbreadline/smbreadline.c
@@ -136,6 +136,7 @@ char *smb_readline(const char *prompt, void (*callback)(void
),
                different versions of Readline, so the same function
                works in all of them to date, but we get compiler
                warnings in some.  */
+               rl_basic_word_break_characters = " \t\n";
                rl_attempted_completion_function = RL_COMPLETION_CAST completion
_fn;
        }

The second problem is that the remote completion function will have to
be able to deal with a multi-component path name.

The third is that do_cd will have to deal with a multi-component path name.

If some enterprising individual would like to complete this work it
would be good.

-- 
Regards,
Richard Sharpe
(何以解憂?唯有杜康。--曹操)



More information about the samba-technical mailing list