From cf57626dbc2a5d5b803fed067c6e897a756b23d8 Mon Sep 17 00:00:00 2001 From: Janik von Rotz Date: Wed, 29 Oct 2025 14:53:03 +0100 Subject: [PATCH] docs(agents): reorder variable naming guideline and clarify conditional syntax in bash style guide - Reorder local variable naming rule in AGENTS.md for better flow - Add clarification note about escaping brackets when replacing `[ ]` with `[[ ]]` - Emphasize that `[]` acts as a regex filter in conditional expressions --- AGENTS.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/AGENTS.md b/AGENTS.md index a721f65..ffa3397 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -29,8 +29,8 @@ The following guideline is heavily based on the [Bash Style Guide | ysap.sh](htt **Variables:** Distinct between local and environment vars. -- Use lowercase names for local variables (e.g., `buildx_output`). - Use `local` for all variables inside functions. +- Use lowercase names for local variables (e.g., `buildx_output`). - Use uppercase names for environment variables (e.g. `BUILDX_PLATFORM`) **Functions:** @@ -43,6 +43,7 @@ The following guideline is heavily based on the [Bash Style Guide | ysap.sh](htt - Always use `[[ ... ]]` for conditional testing, not `[ ... ]` or `test`. - Use `((...))` for arithmetic comparisons (e.g., `((a > b))`). +- When you replace `[]` with `[[]]` make sure to escape the brakets. The `[]` is a regex filter. **Command Substitution:**