Commit Graph

7 Commits

Author SHA1 Message Date
Sten Laane
4337799162 feat(bash): add indents query
It's pretty basic at the moment but already makes working with bash
scripts way easier.
2026-01-03 11:29:39 +01:00
Omar Valdez
f47f549f74 feat(bash): highlight arguments of trap and kill builtin commands 2025-12-08 14:47:59 +01:00
Omar Valdez
93537d6998 feat(bash): remove unnecessary captures
- Bash does not have boolean values and the builtin `true`
  and `false` commands are already covered by another capture.
- The grammar has a `number` node and it's already captured.
2025-12-08 13:08:03 +01:00
Éric NICOLAS
9c03c835fb fix(bash): highlight shebang also when spaced
This commit aligns the shebang highlighting in bash syntax to what the
Linux kernel will recognise as a valid shebang construct.

In summary, the kernel will accept both headers:

    #!/usr/bin/env lua
    #! /usr/bin/env lua

The second one is quite prominently used throughout documentation
online, such as on Wikipedia's page for Shebang (Unix) [1].

Some sources are adamant it wouldn't be supported at a kernel level, but
it looks to me, upon closer inspection of the current kernel code [2],
that it is indeed quite evidently valid.  It'll simply skip over to the
first character that's neither a space 0x20 nor a tab 0x09.

[1] https://en.wikipedia.org/wiki/Shebang_(Unix)
[2] ec7714e494/fs/binfmt_script.c (L44-L71)
2025-06-09 10:43:31 +02:00
Omar Valdez
652831b231 feat(bash): highlight variable argument for printf -v 2025-05-24 11:39:59 +02:00
Lewis Russell
efbc2a4b72 fix: remove downcase! directive use 2025-05-12 18:43:40 +02:00
Christian Clason
692b051b09 feat!: drop modules, general refactor and cleanup 2025-05-12 18:43:40 +02:00