Skip to content

Commit

Permalink
Add new attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
laniakea64 committed Dec 11, 2024
1 parent fbe69d1 commit 945d0b7
Show file tree
Hide file tree
Showing 3 changed files with 11 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 @@ -87,7 +87,7 @@ syn region justRecipeAttributes
\ contains=justRecipeAttr,justRecipeAttrSep,justRecipeAttrArgs,justRecipeAttrArgError,justRecipeAttrValueShort

syn keyword justRecipeAttr
\ confirm doc extension group linux macos no-cd no-exit-message no-quiet positional-arguments private script unix windows
\ confirm doc extension group linux macos no-cd no-exit-message no-quiet openbsd positional-arguments private script unix windows working-directory
\ contained
syn match justRecipeAttrSep ',' contained
syn match justRecipeAttrValueShort '\v:%(\_s|\\\n)*' transparent contained
Expand Down
5 changes: 5 additions & 0 deletions tests/cases/recipes-with-extras.html
Original file line number Diff line number Diff line change
Expand Up @@ -170,3 +170,8 @@
<span class="Number">&Tab;echo </span><span class="Delimiter">{{</span><span class="Constant">UNDERLINE</span><span class="Delimiter">}}{{</span><span class="Constant">MAGENTA</span><span class="Delimiter">}}</span><span class="Number">Magenta underlined text</span><span class="Delimiter">{{</span><span class="Constant">NORMAL</span><span class="Delimiter">}}</span>
<span class="Number">&Tab;echo </span><span class="String">"</span><span class="Delimiter">{{</span><span class="Function">style</span><span class="Normal">(</span><span class="String">'command'</span><span class="Normal">)</span><span class="Delimiter">}}</span><span class="String">echo command</span><span class="Delimiter">{{</span><span class="Constant">NORMAL</span><span class="Delimiter">}}</span><span class="String">"</span>
<span class="Number">&Tab;echo </span><span class="Delimiter">{{</span><span class="Function">quote</span><span class="Normal">(</span><span class="Function">style</span><span class="Normal">(</span><span class="String">'command'</span><span class="Normal">) </span><span class="Operator">+</span><span class="Normal"> </span><span class="String">'echo command'</span><span class="Normal"> </span><span class="Operator">+</span><span class="Normal"> </span><span class="Constant">NORMAL</span><span class="Normal">)</span><span class="Delimiter">}}</span><span class="Number"> &gt;&amp;2</span>

<span class="Type">[working-directory(</span><span class="String">'../..'</span><span class="Type">)]</span>
<span class="Function">attr-working-directory</span><span class="Operator">:</span>
<span class="Number">&Tab;pwd</span>
<span class="Number">&Tab;ls -lA</span>
5 changes: 5 additions & 0 deletions tests/cases/recipes-with-extras.just
Original file line number Diff line number Diff line change
Expand Up @@ -170,3 +170,8 @@ styles:
echo {{UNDERLINE}}{{MAGENTA}}Magenta underlined text{{NORMAL}}
echo "{{style('command')}}echo command{{NORMAL}}"
echo {{quote(style('command') + 'echo command' + NORMAL)}} >&2

[working-directory('../..')]
attr-working-directory:
pwd
ls -lA

0 comments on commit 945d0b7

Please sign in to comment.