Problem with bash filename completetion
Michael Schwendt
mschwendt at gmail.com
Fri Oct 16 07:37:53 UTC 2015
On Thu, 15 Oct 2015 14:37:42 +0200, Jon Ingason wrote:
> mkdir -p vb-2015-10-15_07\:51\:53-win10/Machines
>
> and then used <TAB> to complete:
>
> ls vb-<TAB>
>
> and got
>
> ls vb-2015-10-15_07\:51\:53-win10/
>
> and with
>
> ls vb-<TAB>/M<TAB>
> ls vb-2015-10-15_07\:51\:53-win10/Machines/
Which works good enough, doesn't it?
> But if I wrote
>
> ls vb-2015-10-15_07:51:53-win10/M<TAB>
> ls: can't access vb-2015-10-15_07:51:53-win10/M: The file or the
> directory does not exist
>
> The reason for this is you need to escape : with \ so that the shell
> understand that : is a character.
You can try the same with a few other characters, such as ';' instead of ':'.
Different symptoms, but also requires escaping.
Or quotes: ls "vb-2015-10-15_07:51:53-win1"/M<TAB>
More information about the test
mailing list