Skip to content

Commit

Permalink
Add [confirm] attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
laniakea64 committed Dec 20, 2023
1 parent e2e42ae commit 0039f3b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion syntax/just.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions tests/cases/recipes-with-extras.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
<span class="Number"> pwd</span>

<span class="Type">[private]</span>
<span class="Type">[confirm]</span>
<span class="Type">[no-exit-message]</span>
<span class="Function">error</span><span class="Operator">:</span>
<span class="Number"> sh -c </span><span class="String">'echo Exit 3;exit 3'</span>
Expand Down
1 change: 1 addition & 0 deletions tests/cases/recipes-with-extras.just
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ runpwd:
pwd

[private]
[confirm]
[no-exit-message]
error:
sh -c 'echo Exit 3;exit 3'
Expand Down

0 comments on commit 0039f3b

Please sign in to comment.