From a79e765bc782f21251f388ef82af43f06d1e0fc8 Mon Sep 17 00:00:00 2001 From: Giuseppe Bilotta Date: Mon, 1 Aug 2011 12:06:41 +0200 Subject: [PATCH] Diff patterns for POSIX shells 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 file changed, 3 insertions(+) diff --git a/userdiff.c b/userdiff.c index dbfb4e13cd..96e3f05bba 100644 --- a/userdiff.c +++ b/userdiff.c @@ -121,6 +121,9 @@ PATTERNS("ruby", "^[ \t]*((class|module|def)[ \t].*)$", "(@|@@|\\$)?[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}\\{.*)$", -- 2.32.0.93.g670b81a890