1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Extended wildcards

Discussion in 'Suggestions' started by Roedy, Nov 27, 2011.

  1. Roedy

    Joined:
    Jun 8, 2008
    Messages:
    120
    Likes Received:
    2
    SVN and ANT use a extended wildcard syntax.

    I can say something like:

    dir **/foot/*.html

    To find al the *.html files in /foot directories wherever they appear in the tree.

    It would be nice to do that as tersely in TCC.
     
  2. David Marcus

    Joined:
    Jun 4, 2008
    Messages:
    648
    Likes Received:
    1
    You can: "TCC (but not TCC/LE) also supports wildcards in the directory names (but not in the drive name). You can control the subdirectory recursion by specifying * or ** in the path. A * will match a single subdirectory level; a ** will match any all subdirectory levels for that pathname. Directory wildcards also support regular expressions."
     
  3. Tristram Shandy

    Joined:
    Oct 1, 2011
    Messages:
    11
    Likes Received:
    0
    Cmd.exe can use wildcards for the cd statement and tccle cannot. This is the reason I continue to use cmd.exe and not tccle. Cmd.exe is free and so is tccle, but tccle cannot use wildcards and cmd exe can. Score one for Microsoft and zero for jpsoft.
     
  4. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,307
    Likes Received:
    39
    Easy enough to implement -- remember that you can alias internal commands -- but why on earth would you want that? CD seems like a bad place for indeterminate behavior!
     
  5. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    9,859
    Likes Received:
    83
    IMO the CMD implementation is catastrophically stupid. (And it also won't work at all if you also have a file that matches the wildcard spec.) Since Microsoft does not document wildcards in CMD's CD, I'm inclined to write it off as a bug and not a feature.

    However, TCC/LE has *always* supported wildcards in CD, just not the blind "maybe I'll change to a random matching directory and maybe I won't" behavior of CMD. Try:

    CD r*<F7>

    Typing CD, some leading directory name character, and then press the F7 key for a popup window or the tab or F9 key for sequential matches on the command line.

    Note that the filename completion will include non-directories as well unless you define a custom completion for CD (see "Customizing Filename Completion" in the help).
     
  6. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,307
    Likes Received:
    39
    It also works just as well without the asterisk. Or the CD, for that matter.
     

Share This Page