[Dirvish] pattern matching hash on excludes

Paul Slootman paul at debian.org
Thu Oct 27 06:41:38 PDT 2005


On Thu 27 Oct 2005, mfaz001-foo at yahoo.com wrote:
>  
> > How about:
> > 
> > exclude:
> >     [#]cvs.*
> 
> Alas not. There's this around line 1176 of the dirvish
> script: 
> -----------------------------------------    
> while(<$CONFIG>)
>         {
>                 chomp;
>                 s/\s*#.*$//;

This should probably be:

                s/^\s*#.*$//;

This means that comments can only be on a line of their own (not at the
end of "real" configuration lines), but I wonder how bad that would
be... Otherwise something like this, so that escaping the # would work:

                if (/\\#/) {
                    s/\\#/#/;
                }
                else {
                    s/\s*#.*$//;
                }

Perhaps more backslashes are needed; again, untested :)


Paul Slootman


More information about the Dirvish mailing list