help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: genpath -- ignore file patterns?


From: John W. Eaton
Subject: Re: genpath -- ignore file patterns?
Date: Wed, 27 Oct 2010 13:20:39 -0400

On 27-Oct-2010, Jordi Gutiérrez Hermoso wrote:

| On 27 October 2010 11:18, fork <address@hidden> wrote:
| > Is there a way to make genpath ignore file patterns, specifically 
everything in
| > my .git directory?
| 
| There was a recent patch to enable this, but it's not smart enough to
| do file patterns:
| 
|      http://hg.savannah.gnu.org/hgweb/octave/rev/386aa01ca84c
| 
| I couldn't think of a simple way to do file patterns here.

What kind of patterns, regexp or filename globbing?  It seems more
natural to me to use filename globbing patterns to exclude filenames.
If you want to do that, then I think you could use the fnmatch
function inside genpath to handle your excluded filenames as globbing
patterns instead of literal filenames.  In Octave, it's available as
octave_fnmatch.  Include the header file liboctave/oct-glob.h.

jwe



reply via email to

[Prev in Thread] Current Thread [Next in Thread]