View Ticket
Ticket Hash: 08f731aa3b74a1909a403d550e793d1e1c70cbab
Title: C-VFS: glob file*.ext finds nothing while glob Ü.ext finds "file.ext"
Status: Open Type: Code Defect
Severity: Important Priority: Immediate
Subsystem: Tcl Resolution: Open
Last Modified: 2020-05-29 15:36:10
Version Found In: trunk 2020-01-22
Description:
<div>Dear Roy,</div><div><br /></div><div>thank you for great C-VFS.<br /></div><div><br /></div><div>I have a strange phenomenon with glob within C-VFS:</div><div><pre id="mkup_code_23" class="sh_tcl sh_sourceCode"><span class="sh_symbol">%</span> <a href="https://wiki.tcl-lang.org/page/glob" class="sh_keyword">glob</a> <span class="sh_symbol">-</span>directory <span class="sh_variable">$::starkit::tclkitroot</span> <span class="sh_symbol">-</span>nocomplain <span class="sh_symbol">-</span>types f <span class="sh_symbol">*.</span>tcl
C<span class="sh_symbol">:/.</span>KITDLL_TCL<span class="sh_symbol">/</span>main<span class="sh_number">.</span>tcl C<span class="sh_symbol">:/.</span>KITDLL_TCL<span class="sh_symbol">/</span>runme<span class="sh_number">.</span>tcl
<span class="sh_symbol">%</span> <a href="https://wiki.tcl-lang.org/page/glob" class="sh_keyword">glob</a> <span class="sh_symbol">-</span>directory <span class="sh_variable">$::starkit::tclkitroot</span> <span class="sh_symbol">-</span>nocomplain <span class="sh_symbol">-</span>types f run<span class="sh_symbol">*.</span>tcl

<span class="sh_symbol">%</span> <a href="https://wiki.tcl-lang.org/page/glob" class="sh_keyword">glob</a> <span class="sh_symbol">-</span>directory <span class="sh_variable">$::starkit::tclkitroot</span> <span class="sh_symbol">-</span>nocomplain <span class="sh_symbol">-</span>types f <span class="sh_cbracket">{</span><span class="sh_symbol">*.</span>t<span class="sh_symbol">[</span>xc<span class="sh_symbol">][</span>tl<span class="sh_symbol">]</span><span class="sh_cbracket">}</span>
C<span class="sh_symbol">:/.</span>KITDLL_TCL<span class="sh_symbol">/</span>main<span class="sh_number">.</span>tcl C<span class="sh_symbol">:/.</span>KITDLL_TCL<span class="sh_symbol">/</span>runme<span class="sh_number">.</span>tcl C<span class="sh_symbol">:/.</span>KITDLL_TCL<span class="sh_symbol">/</span>runme<span class="sh_number">.</span>txt<br /><br /><br />So if there is a pattern with "abc*.txt", nothing is found, but the pattern "*.txt" works.<br /><br />I may investigate further myself.<br /><br />Thank you,<br />Harald<br /></pre></div>
User Comments:
anonymous added on 2020-05-29 15:36:10:
The interesting editor has quite scrambled the example.

Here is the example again:

% glob -directory $::starkit::tclkitroot -nocomplain -types f *.tcl
C:/.KITDLL_TCL/main.tcl C:/.KITDLL_TCL/runme.tcl
% glob -directory $::starkit::tclkitroot -nocomplain -types f run*.tcl

% glob -directory $::starkit::tclkitroot -nocomplain -types f {*.t[xc][tl]}
C:/.KITDLL_TCL/main.tcl C:/.KITDLL_TCL/runme.tcl C:/.KITDLL_TCL/runme.txt

Sorry,
Harald