Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Engmark <victor@engmark.name>2020-10-22 02:45:08 +0300
committerJunio C Hamano <gitster@pobox.com>2020-10-22 20:29:30 +0300
commit2ff6c34612057baccbd841524106c5a05f6be6d6 (patch)
tree74d41a027c7ecc6297cc8553658006234cb93b44 /t/t4018/bash-missing-parentheses
parent69986e19ffcfb9af674ae5180689ab7bbf92ed28 (diff)
userdiff: support Bash
Support POSIX, bashism and mixed function declarations, all four compound command types, trailing comments and mixed whitespace. Even though Bash allows locale-dependent characters in function names <https://unix.stackexchange.com/a/245336/3645>, only detect function names with characters allowed by POSIX.1-2017 <https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_235> for simplicity. This should cover the vast majority of use cases, and produces system-agnostic results. Since a word pattern has to be specified, but there is no easy way to know the default word pattern, use the default `IFS` characters for a starter. A later patch can improve this. Signed-off-by: Victor Engmark <victor@engmark.name> Acked-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4018/bash-missing-parentheses')
-rw-r--r--t/t4018/bash-missing-parentheses6
1 files changed, 6 insertions, 0 deletions
diff --git a/t/t4018/bash-missing-parentheses b/t/t4018/bash-missing-parentheses
new file mode 100644
index 0000000000..8c8a05dd7a
--- /dev/null
+++ b/t/t4018/bash-missing-parentheses
@@ -0,0 +1,6 @@
+function RIGHT {
+ functionInvalidSyntax {
+ :
+ echo 'ChangeMe'
+ }
+}