From 0039f3b1670092e5000d60d9437a7ae3b74470e2 Mon Sep 17 00:00:00 2001 From: laniakea64 Date: Tue, 19 Dec 2023 23:17:18 -0500 Subject: [PATCH] Add `[confirm]` attribute --- syntax/just.vim | 2 +- tests/cases/recipes-with-extras.html | 1 + tests/cases/recipes-with-extras.just | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/syntax/just.vim b/syntax/just.vim index 19b34bb..99cc093 100644 --- a/syntax/just.vim +++ b/syntax/just.vim @@ -54,7 +54,7 @@ syn match justAssignmentOperator ":=" contained syn match justRecipeAt "^@" contained syn match justRecipeColon ":" contained -syn match justRecipeAttr '^\v\[%(\s|\\\n)*%(no-%(cd|exit-message)|linux|macos|unix|windows|private)%(%(\s|\\\n)*,%(\s|\\\n)*%(no-%(cd|exit-message)|linux|macos|unix|windows|private))*%(\s|\\\n)*\]' +syn match justRecipeAttr '^\v\[%(\s|\\\n)*%(confirm|no-%(cd|exit-message)|linux|macos|unix|windows|private)%(%(\s|\\\n)*,%(\s|\\\n)*%(confirm|no-%(cd|exit-message)|linux|macos|unix|windows|private))*%(\s|\\\n)*\]' syn match justRecipeDeclSimple "\v^\@?\h[a-zA-Z0-9_-]*%(%(\s|\\\n)*:\=@!)@=" \ transparent contains=justRecipeName diff --git a/tests/cases/recipes-with-extras.html b/tests/cases/recipes-with-extras.html index c0836f2..d509b12 100644 --- a/tests/cases/recipes-with-extras.html +++ b/tests/cases/recipes-with-extras.html @@ -37,6 +37,7 @@ pwd [private] +[confirm] [no-exit-message] error: sh -c 'echo Exit 3;exit 3' diff --git a/tests/cases/recipes-with-extras.just b/tests/cases/recipes-with-extras.just index 72f44ff..4ca2a1d 100644 --- a/tests/cases/recipes-with-extras.just +++ b/tests/cases/recipes-with-extras.just @@ -37,6 +37,7 @@ runpwd: pwd [private] +[confirm] [no-exit-message] error: sh -c 'echo Exit 3;exit 3'