The cd command in smbclient will not do pathname completion across a backslash (\)
Richard Sharpe
realrichardsharpe at gmail.com
Sat Sep 19 00:14:11 UTC 2015
On Fri, Sep 18, 2015 at 1:58 PM, Jeremy Allison <jra at samba.org> wrote:
> On Fri, Sep 18, 2015 at 01:38:19PM -0700, Richard Sharpe wrote:
>> 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;
>> }
>
> C'mon Richard, submit as a git format-patch patch
> with your 'Signed-off-by:' please :-).
>
> That way it's an easy review + add without the reviewer
> having to fart around fixing up stuff you can easily
> do :-).
OK, so I was wrong. It seems that all I needed to do was to set the
variable rl_basic_word_break_characters and the current code does the
rest.
Attached find a git format-patch patch.
--
Regards,
Richard Sharpe
(何以解憂?唯有杜康。--曹操)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Change-the-libreadline-word-break-character-set-to-o.patch
Type: text/x-patch
Size: 1189 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20150918/845ade1e/0001-Change-the-libreadline-word-break-character-set-to-o.bin>
More information about the samba-technical
mailing list