#207 Glipse search denied in some Linux distributions


Depending on the Linux distribution, glimpse invocation (in 0.11 and beta 0.12) may fail with error message:

/usr/bin/glimpse: unmatched '[', ']' (use \[, \] to search for [, ])

This is known to happen under Gentoo (reported by conquistdor in the Help forum), but not under Fedora.

The cause is in the file filter that exclude file whose name end in ,v (CVS database) and ~ (editor backup). The filter is coded as a complex "positive" pattern defining all accepted filenames (that's the logical negation of the exclusion). The filter is passed to glimpse with -F option. Glimpse seems to have trouble to process the union of two negations followed by the "end of string" anchor $ under some distributions.

-F may be used to pass more directives than just a pattern to agrep: the -F argument may contain a full set of agrep options and arguments. Since agrep has an "exclude" option, the complex negated pattern may be replaced by a much simpler exclusion pattern preceded by the -v agrep option.


  • Andre-Littoz

    Andre-Littoz - 2012-04-14

    In sub glimpsesearch, the following option to glimpse
    -F (\\,[^v\\~]|[^\\,][^\\~])\$
    is changed to
    -F '-v (\\,v\|\\~)\$'

    This simpler pattern seems better accepted across distributions.

  • Andre-Littoz

    Andre-Littoz - 2012-04-14
    • status: open --> closed-fixed

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks