From: Giuseppe Bilotta Date: Mon, 01 Aug 2011 10:37:48 GMT Subject: [PATCH 1/2] Diff patterns for POSIX shells Message-ID: <1312195069-10782-2-git-send-email-giuseppe.bilotta@gmail.com> In-Reply-To: <1312195069-10782-1-git-send-email-giuseppe.bilotta@gmail.com> All diffs following a function definition will have that function name as chunck header, but this is the best we can do with the current userdiff capabilities. Signed-off-by: Giuseppe Bilotta --- userdiff.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/userdiff.c b/userdiff.c index 01d3a8b..70120c3 100644 --- a/userdiff.c +++ b/userdiff.c @@ -107,6 +107,9 @@ "(@|@@|\\$)?[a-zA-Z_][a-zA-Z0-9_]*" "|[-+0-9.e]+|0[xXbB]?[0-9a-fA-F]+|\\?(\\\\C-)?(\\\\M-)?." "|//=?|[-+*/<>%&^|=!]=|<<=?|>>=?|===|\\.{1,3}|::|[!=]~"), +PATTERNS("shell", "^[ \t]*([a-zA-Z_0-9]+)[ \t]*\\(\\).*", + /* -- */ + "(--|\\$)?[a-zA-Z_0-9]+|&&|\\|\\|"), PATTERNS("bibtex", "(@[a-zA-Z]{1,}[ \t]*\\{{0,1}[ \t]*[^ \t\"@',\\#}{~%]*).*$", "[={}\"]|[^={}\" \t]+"), PATTERNS("tex", "^(\\\\((sub)*section|chapter|part)\\*{0,1}\\{.*)$", -- 1.7.6.451.gcb935.dirty