aboutsummaryrefslogtreecommitdiffstats
path: root/tests/indent/bash
diff options
context:
space:
mode:
authorSten Laane <21343173+StenAL@users.noreply.github.com>2025-12-31 08:59:16 +0200
committerChristian Clason <ch.clason+github@icloud.com>2026-01-03 11:29:39 +0100
commit433779916223596dce3ea64f4b77300c3aa2bfdc (patch)
tree7243819a4eaded7506d8521825a8dbde9491dcad /tests/indent/bash
parentfix(ruby): improve highlights for pattern matching and for...in loops (diff)
downloadnvim-treesitter-433779916223596dce3ea64f4b77300c3aa2bfdc.tar
nvim-treesitter-433779916223596dce3ea64f4b77300c3aa2bfdc.tar.gz
nvim-treesitter-433779916223596dce3ea64f4b77300c3aa2bfdc.tar.bz2
nvim-treesitter-433779916223596dce3ea64f4b77300c3aa2bfdc.tar.lz
nvim-treesitter-433779916223596dce3ea64f4b77300c3aa2bfdc.tar.xz
nvim-treesitter-433779916223596dce3ea64f4b77300c3aa2bfdc.tar.zst
nvim-treesitter-433779916223596dce3ea64f4b77300c3aa2bfdc.zip
feat(bash): add indents query
It's pretty basic at the moment but already makes working with bash scripts way easier.
Diffstat (limited to 'tests/indent/bash')
-rw-r--r--tests/indent/bash/test.sh39
1 files changed, 39 insertions, 0 deletions
diff --git a/tests/indent/bash/test.sh b/tests/indent/bash/test.sh
new file mode 100644
index 000000000..7e708a93d
--- /dev/null
+++ b/tests/indent/bash/test.sh
@@ -0,0 +1,39 @@
+for i in 1 2 3; do
+ if [[ true ]]; then
+ echo "asd"
+ elif [ true ]; then
+ echo "dsa"
+ else
+ echo ""
+ fi
+ echo $i
+done
+
+while true; do
+ break
+done
+
+case $foo in
+ a) echo a ;;
+ b) echo b ;;
+esac
+
+function x() {
+ echo x
+}
+
+y() {
+ echo y
+}
+
+{
+ echo z
+}
+
+(
+ echo subshell
+)
+
+A=$(
+ echo command substitution
+)