]> git.ipfire.org Git - thirdparty/git.git/blobdiff - userdiff.c
completion: bash: check for alias loop
[thirdparty/git.git] / userdiff.c
index eb698eaca782b51ff1b2e6b22aed24d1159da6ec..3f81a2261c5e97e5cf50c1dc45ed196da8759f69 100644 (file)
@@ -168,7 +168,7 @@ PATTERNS("perl",
         "|=~|!~"
         "|<<|<>|<=>|>>"),
 PATTERNS("php",
-        "^[\t ]*(((public|protected|private|static)[\t ]+)*function.*)$\n"
+        "^[\t ]*(((public|protected|private|static|abstract|final)[\t ]+)*function.*)$\n"
         "^[\t ]*((((final|abstract)[\t ]+)?class|interface|trait).*)$",
         /* -- */
         "[a-zA-Z_][a-zA-Z0-9_]*"
@@ -186,7 +186,7 @@ PATTERNS("ruby", "^[ \t]*((class|module|def)[ \t].*)$",
         "|[-+0-9.e]+|0[xXbB]?[0-9a-fA-F]+|\\?(\\\\C-)?(\\\\M-)?."
         "|//=?|[-+*/<>%&^|=!]=|<<=?|>>=?|===|\\.{1,3}|::|[!=]~"),
 PATTERNS("rust",
-        "^[\t ]*((pub(\\([^\\)]+\\))?[\t ]+)?((async|const|unsafe|extern([\t ]+\"[^\"]+\"))[\t ]+)?(struct|enum|union|mod|trait|fn|impl)[< \t]+[^;]*)$",
+        "^[\t ]*((pub(\\([^\\)]+\\))?[\t ]+)?((async|const|unsafe|extern([\t ]+\"[^\"]+\"))[\t ]+)?(struct|enum|union|mod|trait|fn|impl|macro_rules!)[< \t]+[^;]*)$",
         /* -- */
         "[a-zA-Z_][a-zA-Z0-9_]*"
         "|[0-9][0-9_a-fA-Fiosuxz]*(\\.([0-9]*[eE][+-]?)?[0-9_fF]*)?"
@@ -221,7 +221,7 @@ PATTERNS("csharp",
         "|[-+*/<>%&^|=!]=|--|\\+\\+|<<=?|>>=?|&&|\\|\\||::|->"),
 IPATTERN("css",
         "![:;][[:space:]]*$\n"
-        "^[_a-z0-9].*$",
+        "^[:[@.#]?[_a-z0-9].*$",
         /* -- */
         /*
          * This regex comes from W3C CSS specs. Should theoretically also