Menu

Command line parsing bug

2009-12-14
2013-04-17
  • Tom Halliley

    Tom Halliley - 2009-12-14

    All of the regular expressions used to parse command line options/arguments look like this:

          switch -regexp - $arg {
            {-*d.*} {
              …

    but should look like this:

          switch -regexp - $arg {
            {^-*d.*} {

              …

    that is, the '-' or '-' should only be matched at the beginning of an option.   I happened to have a dash in the middle of a file name and it blew up.

    I found these bugs in tkcvs.tcl itself.

     
  • DorothyR

    DorothyR - 2009-12-15

    No one has reported this before.  I think use of the command line is fairly uncommon, as are filenames with hyphens.  I'll fix it for the upcoming release.  -d

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.