From 3c235ee8078a8f18c13f3205e19400bec8fa24da Mon Sep 17 00:00:00 2001
From: Nick Treleaven
Date: Wed, 11 Aug 2010 14:39:15 +0000
Subject: [PATCH] r5089:5092
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/branches/Geany-0_19_1@5141 ea778897-0a13-0410-b9d1-a72fbfd435f5
---
ChangeLog | 6 ++++++
doc/geany.html | 16 +++++++++-------
doc/geany.txt | 18 +++++++++++-------
src/search.c | 1 +
4 files changed, 27 insertions(+), 14 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 4dd33cd50..7e5a2a7c8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-07-06 Nick Treleaven
+
+ * src/search.c, doc/geany.txt, doc/geany.html:
+ Fix Grep --exclude-dir example.
+
+
2010-07-02 Nick Treleaven
* doc/geany.txt, doc/geany.html:
diff --git a/doc/geany.html b/doc/geany.html
index 675340578..1bbc3340c 100644
--- a/doc/geany.html
+++ b/doc/geany.html
@@ -1596,13 +1596,15 @@ the grep tool.
When using the Recurse in subfolders option with a directory that's
-under version control, you can set the Extra options field to use
-grep's --exclude flag to filter out filenames.
+under version control, you can set the
Extra options field to filter
+out version control files.
+
If you have GNU Grep >= 2.5.2 you can use the --exclude-dir
+argument to filter out CVS and hidden directories like .svn.
+
Example: --exclude-dir=.svn --exclude-dir=CVS
+
If you have an older Grep, you can try using the --exclude flag
+to filter out filenames.
SVN Example: --exclude=*.svn-base
-
The --exclude argument only matches the file name part, not the path. If
-you have GNU Grep >= 2.5.2 you can use the --exclude-dir argument to
-filter out CVS and hidden directories like .svn.
-
Example: --exclude-dir=.* --exclude-dir=CVS
+
The --exclude argument only matches the file name part, not the path.
@@ -6096,7 +6098,7 @@ USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/doc/geany.txt b/doc/geany.txt
index 904327b90..f7dcccc29 100644
--- a/doc/geany.txt
+++ b/doc/geany.txt
@@ -1229,16 +1229,20 @@ Filtering out version control files
```````````````````````````````````
When using the *Recurse in subfolders* option with a directory that's
-under version control, you can set the *Extra options* field to use
-grep's ``--exclude`` flag to filter out filenames.
+under version control, you can set the *Extra options* field to filter
+out version control files.
-SVN Example: ``--exclude=*.svn-base``
+If you have GNU Grep >= 2.5.2 you can use the ``--exclude-dir``
+argument to filter out CVS and hidden directories like ``.svn``.
+
+Example: ``--exclude-dir=.svn --exclude-dir=CVS``
-The --exclude argument only matches the file name part, not the path. If
-you have GNU Grep >= 2.5.2 you can use the ``--exclude-dir`` argument to
-filter out CVS and hidden directories like ``.svn``.
+If you have an older Grep, you can try using the ``--exclude`` flag
+to filter out filenames.
+
+SVN Example: ``--exclude=*.svn-base``
-Example: ``--exclude-dir=.* --exclude-dir=CVS``
+The --exclude argument only matches the file name part, not the path.
Replace
diff --git a/src/search.c b/src/search.c
index b5b7bf4d1..cc01585dc 100644
--- a/src/search.c
+++ b/src/search.c
@@ -1447,6 +1447,7 @@ search_find_in_files(const gchar *utf8_search_text, const gchar *dir, const gcha
/* finally add the arguments(files to be searched) */
if (strstr(argv_prefix[1], "r")) /* recursive option set */
{
+ /* Use '.' so we get relative paths in the output */
argv_prefix[i++] = g_strdup(".");
argv_prefix[i++] = NULL;
argv = argv_prefix;
--
2.11.4.GIT