From 2ff6c34612057baccbd841524106c5a05f6be6d6 Mon Sep 17 00:00:00 2001 From: Victor Engmark Date: Thu, 22 Oct 2020 12:45:08 +1300 Subject: 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 , only detect function names with characters allowed by POSIX.1-2017 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 Acked-by: Johannes Sixt Signed-off-by: Junio C Hamano --- t/t4018/bash-mixed-style-compact | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 t/t4018/bash-mixed-style-compact (limited to 't/t4018/bash-mixed-style-compact') diff --git a/t/t4018/bash-mixed-style-compact b/t/t4018/bash-mixed-style-compact new file mode 100644 index 0000000000..d9364cba67 --- /dev/null +++ b/t/t4018/bash-mixed-style-compact @@ -0,0 +1,4 @@ +function RIGHT(){ + : + echo 'ChangeMe' +} -- cgit v1.2.3