<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>The Ops Community ⚙️: Emre</title>
    <description>The latest articles on The Ops Community ⚙️ by Emre (@emre).</description>
    <link>https://community.ops.io/emre</link>
    <image>
      <url>https://community.ops.io/images/-1mRGpUe6se9sd8pQHYNMVobV9llH37FJNRGQnS-dcU/rs:fill:90:90/g:sm/mb:500000/ar:1/aHR0cHM6Ly9jb21t/dW5pdHkub3BzLmlv/L3JlbW90ZWltYWdl/cy91cGxvYWRzL3Vz/ZXIvcHJvZmlsZV9p/bWFnZS85MTcvZGQz/ODYzODctZDJhNi00/NWM0LWI2ZGEtNTYy/NDhlNGMxY2UzLmpw/ZWc</url>
      <title>The Ops Community ⚙️: Emre</title>
      <link>https://community.ops.io/emre</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://community.ops.io/feed/emre"/>
    <language>en</language>
    <item>
      <title>✨〰️ ZI 〰️✨ Vim Syntax</title>
      <dc:creator>Emre</dc:creator>
      <pubDate>Thu, 28 Apr 2022 08:52:53 +0000</pubDate>
      <link>https://community.ops.io/zsh/-zi-vim-syntax-14fj</link>
      <guid>https://community.ops.io/zsh/-zi-vim-syntax-14fj</guid>
      <description>&lt;p&gt;&lt;a href="https://community.ops.io/images/PxOXrZebj5AbDai_gYqO10eqFupGiKD-zKHMbp4jE4c/w:880/mb:500000/ar:1/aHR0cHM6Ly9jZG4t/aW1hZ2VzLTEubWVk/aXVtLmNvbS9tYXgv/MzIwLzAqRjFzU0tX/eWE4YXhmM0tJWS5w/bmc" class="article-body-image-wrapper"&gt;&lt;img src="https://community.ops.io/images/PxOXrZebj5AbDai_gYqO10eqFupGiKD-zKHMbp4jE4c/w:880/mb:500000/ar:1/aHR0cHM6Ly9jZG4t/aW1hZ2VzLTEubWVk/aXVtLmNvbS9tYXgv/MzIwLzAqRjFzU0tX/eWE4YXhmM0tJWS5w/bmc" alt="ZI Swiss army knife" width="320" height="320"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;a href="https://github.com/z-shell/zi"&gt;❮ ZI ❯&lt;/a&gt; 🧙‍‍♀️ A Swiss Army Knife for Zsh.
&lt;/h3&gt;

&lt;p&gt;Designed to glue everything together. 🔗&lt;/p&gt;

&lt;p&gt;&lt;a href="https://z.digitalclouds.dev"&gt;https://z.digitalclouds.dev&lt;/a&gt; | &lt;a href="https://github.com/z-shell/"&gt;GitHub&lt;/a&gt; | &lt;a href="https://github.com/orgs/z-shell/discussions/"&gt;Discussions&lt;/a&gt; | &lt;a href="https://crowdin.digitalclouds.dev"&gt;Localize&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;A Vim syntax definition for &lt;a href="https://github.com/z-shell/zi"&gt;ZI&lt;/a&gt; commands in any file of type &lt;code&gt;zsh&lt;/code&gt;.&lt;/p&gt;




&lt;h3&gt;
  
  
  📥 Installation
&lt;/h3&gt;

&lt;p&gt;Load as a Vim plugin. E.g. when using &lt;a href="https://github.com/junegunn/vim-plug"&gt;vim-plug&lt;/a&gt;, add to &lt;code&gt;~/.vimrc&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Plug 'z-shell/zi-vim-syntax'

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and then issue the &lt;code&gt;:PlugInstall&lt;/code&gt; command.&lt;/p&gt;




&lt;h3&gt;
  
  
  📕 Manual Installation
&lt;/h3&gt;

&lt;p&gt;To install the syntax copy the file &lt;code&gt;after/syntax/zsh.vim&lt;/code&gt; under the path &lt;code&gt;~/.vim/syntax/after&lt;/code&gt;.&lt;/p&gt;




&lt;h3&gt;
  
  
  ✍️ Examples
&lt;/h3&gt;

&lt;p&gt;✴️ The default theme:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--IRICSVGc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://github.com/z-shell/zi-vim-syntax/raw/main/docs/images/default.png"&gt;&lt;img src="https://community.ops.io/images/vd5li16DEj1MTCaZDI7UdxwDW3rjZ0ld1RyYlVOEmq4/w:880/mb:500000/ar:1/aHR0cHM6Ly9yZXMu/Y2xvdWRpbmFyeS5j/b20vcHJhY3RpY2Fs/ZGV2L2ltYWdlL2Zl/dGNoL3MtLUlSSUNT/VkdjLS0vY19saW1p/dCUyQ2ZfYXV0byUy/Q2ZsX3Byb2dyZXNz/aXZlJTJDcV9hdXRv/JTJDd184ODAvaHR0/cHM6Ly9naXRodWIu/Y29tL3otc2hlbGwv/emktdmltLXN5bnRh/eC9yYXcvbWFpbi9k/b2NzL2ltYWdlcy9k/ZWZhdWx0LnBuZw" alt="plastic" width="880" height="371"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;✴️ The theme &lt;code&gt;flrnprz/plastic.vim&lt;/code&gt;:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--2w0TeeDx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://github.com/z-shell/zi-vim-syntax/raw/main/docs/images/plastic.png"&gt;&lt;img src="https://community.ops.io/images/YEfbRgRgUjPbYWL6M95qJ2bxa-3sBjw4LUss2vMwyqk/w:880/mb:500000/ar:1/aHR0cHM6Ly9yZXMu/Y2xvdWRpbmFyeS5j/b20vcHJhY3RpY2Fs/ZGV2L2ltYWdlL2Zl/dGNoL3MtLTJ3MFRl/ZUR4LS0vY19saW1p/dCUyQ2ZfYXV0byUy/Q2ZsX3Byb2dyZXNz/aXZlJTJDcV9hdXRv/JTJDd184ODAvaHR0/cHM6Ly9naXRodWIu/Y29tL3otc2hlbGwv/emktdmltLXN5bnRh/eC9yYXcvbWFpbi9k/b2NzL2ltYWdlcy9w/bGFzdGljLnBuZw" alt="plastic" width="880" height="379"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;✴️ The theme &lt;code&gt;slate&lt;/code&gt;:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--qqD7txfc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://github.com/z-shell/zi-vim-syntax/raw/main/docs/images/slate.png"&gt;&lt;img src="https://community.ops.io/images/9NJiiJWInB53siC7ry36NxIHq56iKRDREO9onm6vC6w/w:880/mb:500000/ar:1/aHR0cHM6Ly9yZXMu/Y2xvdWRpbmFyeS5j/b20vcHJhY3RpY2Fs/ZGV2L2ltYWdlL2Zl/dGNoL3MtLXFxRDd0/eGZjLS0vY19saW1p/dCUyQ2ZfYXV0byUy/Q2ZsX3Byb2dyZXNz/aXZlJTJDcV9hdXRv/JTJDd184ODAvaHR0/cHM6Ly9naXRodWIu/Y29tL3otc2hlbGwv/emktdmltLXN5bnRh/eC9yYXcvbWFpbi9k/b2NzL2ltYWdlcy9z/bGF0ZS5wbmc" alt="slate" width="880" height="378"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;✴️ The theme &lt;code&gt;murphy&lt;/code&gt;:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--kyVpK1A6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://github.com/z-shell/zi-vim-syntax/raw/main/docs/images/murphy.png"&gt;&lt;img src="https://community.ops.io/images/LwJ14a3GBXeERUFzDsN8x5ABRgq8fi1Nfy5_Qy4fOZI/w:880/mb:500000/ar:1/aHR0cHM6Ly9yZXMu/Y2xvdWRpbmFyeS5j/b20vcHJhY3RpY2Fs/ZGV2L2ltYWdlL2Zl/dGNoL3MtLWt5VnBL/MUE2LS0vY19saW1p/dCUyQ2ZfYXV0byUy/Q2ZsX3Byb2dyZXNz/aXZlJTJDcV9hdXRv/JTJDd184ODAvaHR0/cHM6Ly9naXRodWIu/Y29tL3otc2hlbGwv/emktdmltLXN5bnRh/eC9yYXcvbWFpbi9k/b2NzL2ltYWdlcy9t/dXJwaHkucG5n" alt="plastic" width="880" height="376"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;✴️ The theme &lt;code&gt;lucasprag/simpleblack&lt;/code&gt;:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7IB1Y0JK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://github.com/z-shell/zi-vim-syntax/raw/main/docs/images/simpleblack.png"&gt;&lt;img src="https://community.ops.io/images/ms5OLq46wuSHGHSmhmjwaSlXYJv9kg3lP-BeplgYej8/w:880/mb:500000/ar:1/aHR0cHM6Ly9yZXMu/Y2xvdWRpbmFyeS5j/b20vcHJhY3RpY2Fs/ZGV2L2ltYWdlL2Zl/dGNoL3MtLTdJQjFZ/MEpLLS0vY19saW1p/dCUyQ2ZfYXV0byUy/Q2ZsX3Byb2dyZXNz/aXZlJTJDcV9hdXRv/JTJDd184ODAvaHR0/cHM6Ly9naXRodWIu/Y29tL3otc2hlbGwv/emktdmltLXN5bnRh/eC9yYXcvbWFpbi9k/b2NzL2ltYWdlcy9z/aW1wbGVibGFjay5w/bmc" alt="plastic" width="880" height="376"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>zi</category>
      <category>shell</category>
      <category>zsh</category>
      <category>devops</category>
    </item>
    <item>
      <title>✨〰️ ZI 〰️✨ Annex - LinkBin</title>
      <dc:creator>Emre</dc:creator>
      <pubDate>Sat, 09 Apr 2022 15:57:45 +0000</pubDate>
      <link>https://community.ops.io/zsh/-zi-annex-linkbin-l4i</link>
      <guid>https://community.ops.io/zsh/-zi-annex-linkbin-l4i</guid>
      <description>&lt;p&gt;&lt;a href="https://community.ops.io/images/PxOXrZebj5AbDai_gYqO10eqFupGiKD-zKHMbp4jE4c/w:880/mb:500000/ar:1/aHR0cHM6Ly9jZG4t/aW1hZ2VzLTEubWVk/aXVtLmNvbS9tYXgv/MzIwLzAqRjFzU0tX/eWE4YXhmM0tJWS5w/bmc" class="article-body-image-wrapper"&gt;&lt;img src="https://community.ops.io/images/PxOXrZebj5AbDai_gYqO10eqFupGiKD-zKHMbp4jE4c/w:880/mb:500000/ar:1/aHR0cHM6Ly9jZG4t/aW1hZ2VzLTEubWVk/aXVtLmNvbS9tYXgv/MzIwLzAqRjFzU0tX/eWE4YXhmM0tJWS5w/bmc" alt="ZI Swiss army knife" width="320" height="320"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;a href="https://github.com/z-shell/zi"&gt;❮ ZI ❯&lt;/a&gt; 🧙‍‍♀️ A Swiss Army Knife for Zsh.
&lt;/h3&gt;

&lt;p&gt;Designed to glue everything together. 🔗&lt;/p&gt;

&lt;p&gt;&lt;a href="https://z.digitalclouds.dev"&gt;Website&lt;/a&gt; | &lt;a href="https://github.com/z-shell/"&gt;GitHub&lt;/a&gt; | &lt;a href="https://github.com/orgs/z-shell/discussions/"&gt;Discussions&lt;/a&gt; | &lt;a href="https://crowdin.digitalclouds.dev"&gt;Localize&lt;/a&gt; | &lt;a href="https://z.digitalclouds.dev/ecosystem/annexes/"&gt;Wiki Annexes&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;Run programs and scripts without adding anything to &lt;code&gt;$PATH&lt;/code&gt; via the automated links to &lt;code&gt;$ZPFX/bin&lt;/code&gt;&lt;br&gt;
 &lt;a href="https://community.ops.io/images/z0pFWk8WAG4SFqO7jvrn1tOVjHOovrAm4KgQx8ie6Jg/w:880/mb:500000/ar:1/aHR0cHM6Ly9yZXMu/Y2xvdWRpbmFyeS5j/b20vcHJhY3RpY2Fs/ZGV2L2ltYWdlL2Zl/dGNoL3MtLWFBMkNz/bldILS0vY19saW1p/dCUyQ2ZfYXV0byUy/Q2ZsX3Byb2dyZXNz/aXZlJTJDcV9hdXRv/JTJDd184ODAvaHR0/cHM6Ly9kZXYtdG8t/dXBsb2Fkcy5zMy5h/bWF6b25hd3MuY29t/L3VwbG9hZHMvYXJ0/aWNsZXMvZHl0aWxm/cDRuZDI4NXEwenp2/YTAucG5n" class="article-body-image-wrapper"&gt;&lt;img src="https://community.ops.io/images/z0pFWk8WAG4SFqO7jvrn1tOVjHOovrAm4KgQx8ie6Jg/w:880/mb:500000/ar:1/aHR0cHM6Ly9yZXMu/Y2xvdWRpbmFyeS5j/b20vcHJhY3RpY2Fs/ZGV2L2ltYWdlL2Zl/dGNoL3MtLWFBMkNz/bldILS0vY19saW1p/dCUyQ2ZfYXV0byUy/Q2ZsX3Byb2dyZXNz/aXZlJTJDcV9hdXRv/JTJDd184ODAvaHR0/cHM6Ly9kZXYtdG8t/dXBsb2Fkcy5zMy5h/bWF6b25hd3MuY29t/L3VwbG9hZHMvYXJ0/aWNsZXMvZHl0aWxm/cDRuZDI4NXEwenp2/YTAucG5n" alt="eval preview" width="844" height="261"&gt;&lt;/a&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  📥 Install
&lt;/h2&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;zi light z-shell/z-a-linkbin

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  🔧 How it works
&lt;/h2&gt;

&lt;p&gt;Exposing a binary program without modifying &lt;code&gt;$PATH&lt;/code&gt; – &lt;code&gt;z-a-linkbin&lt;/code&gt; will automatically create a hard or soft link to the binary in &lt;code&gt;$ZPFX/bin&lt;/code&gt; exposing the program to the command line as if it were being placed in &lt;code&gt;$PATH&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The command can then be accessed normally – not only in the live Zsh session, but also from any Zsh script.&lt;/p&gt;

&lt;p&gt;The ice-modifier &lt;code&gt;lbin''&lt;/code&gt; provided by the annex creates &lt;code&gt;links&lt;/code&gt; for binaries and scripts.&lt;/p&gt;

&lt;p&gt;It creates the &lt;code&gt;link&lt;/code&gt; that calls the actual binary.&lt;br&gt;&lt;br&gt;
The link is created always under the same, standard and single &lt;code&gt;$PATH&lt;/code&gt; entry: &lt;code&gt;$ZPFX/bin&lt;/code&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The optional preceding &lt;code&gt;!&lt;/code&gt; flag means create a soft link instead of a hard link.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;For example,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;zi ice from'gh-r' lbin'!fzf'
zi load junegunn/fzf

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check the output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ls -l $ZPFX/bin/ | awk '{print $(NF-2),$(NF-1),$NF}'
fzf --version

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;&lt;strong&gt;The ice can contain globs&lt;/strong&gt;. It will expand these when searching for the binary.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;zi ice from'gh-r' lbin'**fzf -&amp;gt; myfzf'
zi load junegunn/fzf

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check the output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ls $ZPFX/bin
myfzf --version

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;&lt;strong&gt;The ice can be empty&lt;/strong&gt;. It will then try to create the link:&lt;/p&gt;

&lt;p&gt;✴️ trailing component of the &lt;code&gt;id_as&lt;/code&gt; ice, e.g.: &lt;code&gt;id_as'exts/git-my'&lt;/code&gt; → it will check if a file &lt;code&gt;git-my&lt;/code&gt; exists and if yes, create the link &lt;code&gt;git-my&lt;/code&gt;,&lt;br&gt;
✴️ the plugin name, e.g.: for &lt;code&gt;paulirish/git-open&lt;/code&gt; it'll check if a file &lt;code&gt;git-open&lt;/code&gt; exists and if yes, create the link &lt;code&gt;git-open&lt;/code&gt;,&lt;br&gt;
✴️ trailing component of the snippet URL,&lt;br&gt;
✴️ for any alphabetically first executable file.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Above also applies if just &lt;code&gt;!&lt;/code&gt; were passed.&lt;/p&gt;

&lt;p&gt;This repository compatible with &lt;a href="https://github.com/z-shell/zi"&gt;ZI&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Have the best and leave the rest! 😎
&lt;/h3&gt;

</description>
      <category>zi</category>
      <category>shell</category>
      <category>zsh</category>
      <category>devops</category>
    </item>
    <item>
      <title>✨〰️ ZI 〰️✨ Annex - Eval</title>
      <dc:creator>Emre</dc:creator>
      <pubDate>Sat, 09 Apr 2022 09:09:29 +0000</pubDate>
      <link>https://community.ops.io/zsh/-zi-annex-eval-2bme</link>
      <guid>https://community.ops.io/zsh/-zi-annex-eval-2bme</guid>
      <description>&lt;p&gt;&lt;a href="https://community.ops.io/images/PxOXrZebj5AbDai_gYqO10eqFupGiKD-zKHMbp4jE4c/w:880/mb:500000/ar:1/aHR0cHM6Ly9jZG4t/aW1hZ2VzLTEubWVk/aXVtLmNvbS9tYXgv/MzIwLzAqRjFzU0tX/eWE4YXhmM0tJWS5w/bmc" class="article-body-image-wrapper"&gt;&lt;img src="https://community.ops.io/images/PxOXrZebj5AbDai_gYqO10eqFupGiKD-zKHMbp4jE4c/w:880/mb:500000/ar:1/aHR0cHM6Ly9jZG4t/aW1hZ2VzLTEubWVk/aXVtLmNvbS9tYXgv/MzIwLzAqRjFzU0tX/eWE4YXhmM0tJWS5w/bmc" alt="ZI Swiss army knife" width="320" height="320"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;a href="https://github.com/z-shell/zi"&gt;❮ ZI ❯&lt;/a&gt; 🧙‍‍♀️ A Swiss Army Knife for Zsh.
&lt;/h3&gt;

&lt;p&gt;Designed to glue everything together. 🔗&lt;/p&gt;

&lt;p&gt;&lt;a href="https://z.digitalclouds.dev"&gt;Website&lt;/a&gt; | &lt;a href="https://github.com/z-shell/"&gt;GitHub&lt;/a&gt; | &lt;a href="https://github.com/orgs/z-shell/discussions/"&gt;Discussions&lt;/a&gt; | &lt;a href="https://crowdin.digitalclouds.dev"&gt;Localize&lt;/a&gt; | &lt;a href="https://z.digitalclouds.dev/ecosystem/annexes/"&gt;Wiki Annexes&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;Allows to cache the output of arbitrarily slow initialization command to speed up shell startup time.&lt;br&gt;
 &lt;a href="https://community.ops.io/images/U-mCGry-gLHc5tN2sswLUXyHUEWe5BZV8WU0tcyRjtA/w:880/mb:500000/ar:1/aHR0cHM6Ly9yZXMu/Y2xvdWRpbmFyeS5j/b20vcHJhY3RpY2Fs/ZGV2L2ltYWdlL2Zl/dGNoL3MtLTdfa1BS/LS1vLS0vY19saW1p/dCUyQ2ZfYXV0byUy/Q2ZsX3Byb2dyZXNz/aXZlJTJDcV9hdXRv/JTJDd184ODAvaHR0/cHM6Ly9kZXYtdG8t/dXBsb2Fkcy5zMy5h/bWF6b25hd3MuY29t/L3VwbG9hZHMvYXJ0/aWNsZXMvMnJkbmF2/aHptcGpub2dvcjI4/ejEucG5n" class="article-body-image-wrapper"&gt;&lt;img src="https://community.ops.io/images/U-mCGry-gLHc5tN2sswLUXyHUEWe5BZV8WU0tcyRjtA/w:880/mb:500000/ar:1/aHR0cHM6Ly9yZXMu/Y2xvdWRpbmFyeS5j/b20vcHJhY3RpY2Fs/ZGV2L2ltYWdlL2Zl/dGNoL3MtLTdfa1BS/LS1vLS0vY19saW1p/dCUyQ2ZfYXV0byUy/Q2ZsX3Byb2dyZXNz/aXZlJTJDcV9hdXRv/JTJDd184ODAvaHR0/cHM6Ly9kZXYtdG8t/dXBsb2Fkcy5zMy5h/bWF6b25hd3MuY29t/L3VwbG9hZHMvYXJ0/aWNsZXMvMnJkbmF2/aHptcGpub2dvcjI4/ejEucG5n" alt="eval preview" width="587" height="98"&gt;&lt;/a&gt;&lt;/p&gt;



&lt;p&gt;Annex provides a completion file with the prefix _zi, the 'shim' below which will run all available zi completions and the shim is assigned as ZIs completion with a compdef call.&lt;/p&gt;

&lt;p&gt;Synopsis:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;zi recache &amp;lt;plugin/snippet&amp;gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  📥 Installation
&lt;/h2&gt;

&lt;p&gt;Simply load like a regular plugin:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;zi light z-shell/z-a-eval

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After executing this command you can then use the new ice-mods provided by the annex.&lt;/p&gt;




&lt;h2&gt;
  
  
  🔧 How it works
&lt;/h2&gt;

&lt;p&gt;The output of a slow initialization command is redirected to a file located within the plugin/snippets directory and sourced while loading. The next time the plugin/snippet is loaded, this file will be sourced skipping the need to run the initialization command.&lt;/p&gt;

&lt;p&gt;The ice-modifier &lt;code&gt;eval''&lt;/code&gt; provided and handled by this annex creates a &lt;code&gt;cache&lt;/code&gt; in the plugin/snippets root directory which stores the commands output.&lt;/p&gt;

&lt;p&gt;This cache is regenerated when:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The plugin/snippet is updated.&lt;/li&gt;
&lt;li&gt;The cache file is removed.&lt;/li&gt;
&lt;li&gt;With the new ZI subcommand &lt;code&gt;recache&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;The optional preceding &lt;code&gt;!&lt;/code&gt; flag means to store command output regardless of exit code. Otherwise &lt;code&gt;eval''&lt;/code&gt; will avoid caching ouput of code which returns a non-zero exit code.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;p&gt;📕 Example Invocations:&lt;/p&gt;

&lt;h3&gt;
  
  
  Without z-a-eval
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;zi ice as"command" from"gh-r" mv"zoxide* -&amp;gt; zoxide" \
  atclone"./zoxide init zsh &amp;gt; init.zsh" atpull"%atclone" src"init.zsh" nocompile'!'
zi light ajeetdsouza/zoxide


zi ice atclone"dircolors -b LS_COLORS &amp;gt; init.zsh" \
  atpull"%atclone" pick"init.zsh" nocompile'!' \
  atload'zstyle ":completion:*" list-colors “${(s.:.)LS_COLORS}”'
zi light trapd00r/LS_COLORS

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  With z-a-eval
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;zi ice as"command" from"gh-r" mv"zoxide* -&amp;gt; zoxide" \
  eval"./zoxide init zsh"
zi light ajeetdsouza/zoxide


zi ice eval"dircolors -b LS_COLORS" \
  atload'zstyle ":completion:*" list-colors “${(s.:.)LS_COLORS}”'
zi light trapd00r/LS_COLORS

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  Without ZI
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;if [["${+commands[kubectl]}" == 1 ]]; then
  eval $(kubectl completion zsh)
fi

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  With ZI and z-a-eval
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;## Updated during `zi update`
zi ice id-as"kubectl_completion" has"kubectl" \
  eval"kubectl completion zsh" run-atpull
zi light z-shell/null

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;This repository compatible with &lt;a href="https://github.com/z-shell/zi"&gt;ZI&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Have the best and leave the rest! 😎
&lt;/h3&gt;

</description>
      <category>zi</category>
      <category>shell</category>
      <category>zsh</category>
      <category>devops</category>
    </item>
    <item>
      <title>✨〰️ ZI 〰️✨ Doxygen For Shell Scripts</title>
      <dc:creator>Emre</dc:creator>
      <pubDate>Fri, 08 Apr 2022 02:57:04 +0000</pubDate>
      <link>https://community.ops.io/zsh/-zi-doxygen-for-shell-scripts-232j</link>
      <guid>https://community.ops.io/zsh/-zi-doxygen-for-shell-scripts-232j</guid>
      <description>&lt;p&gt;&lt;a href="https://community.ops.io/images/PxOXrZebj5AbDai_gYqO10eqFupGiKD-zKHMbp4jE4c/w:880/mb:500000/ar:1/aHR0cHM6Ly9jZG4t/aW1hZ2VzLTEubWVk/aXVtLmNvbS9tYXgv/MzIwLzAqRjFzU0tX/eWE4YXhmM0tJWS5w/bmc" class="article-body-image-wrapper"&gt;&lt;img src="https://community.ops.io/images/PxOXrZebj5AbDai_gYqO10eqFupGiKD-zKHMbp4jE4c/w:880/mb:500000/ar:1/aHR0cHM6Ly9jZG4t/aW1hZ2VzLTEubWVk/aXVtLmNvbS9tYXgv/MzIwLzAqRjFzU0tX/eWE4YXhmM0tJWS5w/bmc" alt="ZI Swiss army knife" width="320" height="320"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;a href="https://github.com/z-shell/zi"&gt;❮ ZI ❯&lt;/a&gt; 🧙‍‍♀️ A Swiss Army Knife for Zsh.
&lt;/h3&gt;

&lt;p&gt;Designed to glue everything together. 🔗&lt;/p&gt;

&lt;p&gt;&lt;a href="https://z.digitalclouds.dev"&gt;https://z.digitalclouds.dev&lt;/a&gt; | &lt;a href="https://github.com/z-shell/"&gt;GitHub&lt;/a&gt; | &lt;a href="https://github.com/orgs/z-shell/discussions/"&gt;Discussions&lt;/a&gt; | &lt;a href="https://crowdin.digitalclouds.dev"&gt;Localize&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;If there was a tool that parses scripts and extracts comments so it can be documented, collaborated, or used as a manual? If all can be automated so you can concentrate on the code while docs are made on the go? We got your back...&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Contribute to make it better and get extra tools from our projects which are shared between contributors.&lt;br&gt;&lt;br&gt;
Code-newbies with the right attitude is always welcome.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Doxygen For Shell Scripts
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Example of our Z Shell code - &lt;a href="https://z.digitalclouds.dev/docs/code"&gt;https://z.digitalclouds.dev/docs/code&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Parses &lt;code&gt;Zsh&lt;/code&gt; and &lt;code&gt;Bash&lt;/code&gt; scripts, outputs &lt;code&gt;Asciidoc&lt;/code&gt; document with:&lt;/p&gt;

&lt;p&gt;✴️ list of functions, including auto-loading functions,&lt;br&gt;
✴️ call trees of functions and script body,&lt;br&gt;
✴️ comments for functions,&lt;br&gt;
✴️ features used for each function and for script body (features like: &lt;code&gt;eval&lt;/code&gt;, &lt;code&gt;read&lt;/code&gt;, &lt;code&gt;vared&lt;/code&gt;, &lt;code&gt;shopt&lt;/code&gt;, etc.),&lt;br&gt;
✴️ distinct marks for hooks registered with &lt;code&gt;add-zsh-hook&lt;/code&gt; (Zsh),&lt;br&gt;
✴️ list of exported variables,&lt;br&gt;
✴️ list of used exported variables, together with the variable's origin (i.e. possibly another script).&lt;/p&gt;

&lt;p&gt;Call trees support cross-file invocations, i.e. when a script calls a function defined in another file.&lt;/p&gt;

&lt;p&gt;Written in &lt;code&gt;Zshell&lt;/code&gt; language.&lt;/p&gt;


&lt;h2&gt;
  
  
  📥 Installation
&lt;/h2&gt;

&lt;p&gt;Default install path-prefix is &lt;code&gt;/usr/local&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git clone https://github.com/z-shell/zsdoc
cd doc
make
sudo make install

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For custom &lt;code&gt;PREFIX&lt;/code&gt; variable in &lt;code&gt;make&lt;/code&gt; invocation:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# 'sudo' may be required to install

make install PREFIX=~/opt/local
install -c -d ~/opt/local/share/zsdoc
install -c -d ~/opt/local/share/doc/zsdoc

cp build/zsd build/zsd-transform build/zsd-detect build/zsd-to-adoc ~/opt/local/bin
cp README.md NEWS LICENSE ~/opt/local/share/doc/zsdoc
cp zsd.config ~/opt/local/share/zsdoc

➜ cd ~/opt/local

➜ tree.
        ├── bin
        │ ├── zsd
        │ ├── zsd-detect
        │ ├── zsd-to-adoc
        │ └── zsd-transform
        │
        └── share
           ├── doc
           │ └── zsdoc
           │ ├── LICENSE
           │ ├── NEWS
           │ └── README.md
           │
           └── zsdoc
               └── zsd.config

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Other available &lt;code&gt;make&lt;/code&gt; variables are: &lt;code&gt;INSTALL&lt;/code&gt; (to customize install command), &lt;code&gt;BIN_DIR&lt;/code&gt;, &lt;code&gt;SHARE_DIR&lt;/code&gt;, &lt;code&gt;DOC_DIR&lt;/code&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  📕 Usage
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;zsd [-h/--help] [-v/--verbose] [-q/--quiet] [-n/--noansi] [--cignore &amp;lt;pattern&amp;gt;] {file1} [file2] ...

The files will be processed and their documentation will be generated in subdirectory `zsdoc' (with meta-data in subdirectory `data').


Options:
-h/--help Usage information
-v/--verbose More verbose operation-status output
-q/--quiet No status messages
-n/--noansi No colors in terminal output
--cignore Specify which comment lines should be ignored
-f/--fpath Paths are separated by: pointing to directories with functions
--synopsis Text to be used in the SYNOPSIS section. Line break "... +\n", paragraph "...\n\n"
--scomm Strip comment char "#" from function comments
--bash Output is slightly tailored to Bash specifics (instead of Zsh specifics)

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Example &lt;code&gt;--cignore&lt;/code&gt; options:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;--cignore '\#*FUNCTION:*{{{*' - ignore comments like # FUNCTION: usage {{{
--cignore '(\#*FUNCTION:*{{{*|\#*FUN:*{{{*)' - also ignore comments like: # FUN: usage {{{

The file is parsed for synopsis block, which can be e.g.:
# synopsis {{{my synopsis, can be multi-line}}}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Another block that is parsed is commenting on environment variables. It consists of multiple&lt;br&gt;&lt;br&gt;
"VAR_NAME -&amp;gt; var description" lines and results in a table in the output AsciiDoc document.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# env-vars {{{
# PATH -&amp;gt; paths to executables
# MANPATH -&amp;gt; paths to manuals }}}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Change the default brace block-delimiters with &lt;code&gt;--blocka&lt;/code&gt;, &lt;code&gt;--blockb&lt;/code&gt;. Block body should be AsciiDoc.&lt;/p&gt;

&lt;h2&gt;
  
  
  ✍️ Examples
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/z-shell/zsdoc/blob/main/examples/zsh-syntax-highlighting.zsh.adoc"&gt;example 1&lt;/a&gt;, &lt;a href="https://github.com/z-shell/zsdoc/blob/main/examples/zsh-autosuggestions.zsh.adoc"&gt;example 2&lt;/a&gt;&lt;br&gt;&lt;br&gt;
(also in &lt;strong&gt;PDF&lt;/strong&gt; :&lt;br&gt;&lt;br&gt;
&lt;a href="https://raw.githubusercontent.com/z-shell/zsdoc/main/examples/zsh-syntax-highlighting.zsh.pdf"&gt;example 1&lt;/a&gt;, &lt;a href="https://raw.githubusercontent.com/z-shell/zsdoc/main/examples/zsh-autosuggestions.zsh.pdf"&gt;example 2&lt;/a&gt;).&lt;/p&gt;




&lt;h2&gt;
  
  
  📋 Few Rules
&lt;/h2&gt;

&lt;p&gt;Few rules helping to use &lt;code&gt;zsdoc&lt;/code&gt; in your project:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Write function comments before function. Empty lines between comment and function are allowed.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If you use special comments, e.g. &lt;code&gt;vim&lt;/code&gt; (or &lt;code&gt;emacs-origami&lt;/code&gt;) &lt;strong&gt;folds&lt;/strong&gt; , you can ignore these lines with &lt;code&gt;--cignore&lt;/code&gt; (see &lt;a href="https://github.com/z-shell/zsdoc#usage"&gt;Usage&lt;/a&gt;).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If it's possible to avoid &lt;code&gt;eval&lt;/code&gt;, then do that – &lt;code&gt;zsdoc&lt;/code&gt; will analyze more code.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Currently, functions defined in functions are ignored, but this will change shortly.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;I've greatly optimized the new &lt;code&gt;Zsh&lt;/code&gt; version (&lt;code&gt;5.4.2&lt;/code&gt;) for data processing – &lt;code&gt;zsdoc&lt;/code&gt; parse long sources very fast starting from that &lt;code&gt;Zsh&lt;/code&gt; version.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If you have multiple &lt;code&gt;Zsh&lt;/code&gt; versions installed, then (for example) set &lt;code&gt;zsh_control_bin="/usr/local/bin/zsh-5.4.2"&lt;/code&gt; in &lt;code&gt;/usr/local/share/zsdoc/zsd.config&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Be aware that to convert a group of scripts, you simply need &lt;code&gt;zsd file1.zsh file2.zsh ...&lt;/code&gt; – cross-file function invocations will work automatically, and multiple &lt;code&gt;*.adoc&lt;/code&gt; files will be created.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Create &lt;code&gt;Makefile&lt;/code&gt; with &lt;code&gt;doc&lt;/code&gt; target, that does &lt;code&gt;rm -rf zsdoc/data; zsd -v file1.zsh ...&lt;/code&gt;. Documentation will land in &lt;code&gt;zsdoc&lt;/code&gt; directory.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Directory &lt;code&gt;zsdoc/data&lt;/code&gt; holds meta-data used to create &lt;code&gt;asciidoc&lt;/code&gt; documents (&lt;code&gt;*.adoc&lt;/code&gt; files). You can remove it or analyze it yourself.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Obtain &lt;strong&gt;PDFs&lt;/strong&gt; with &lt;a href="http://asciidoctor.org/"&gt;Asciidoctor&lt;/a&gt; tool via: &lt;code&gt;asciidoctor -b pdf -r asciidoctor-pdf file1.zsh.adoc&lt;/code&gt;. Install &lt;code&gt;Asciidoctor&lt;/code&gt; with: &lt;code&gt;gem install asciidoctor-pdf --pre&lt;/code&gt;. (Check out &lt;a href="https://github.com/z-shell/docs/blob/main/code/Makefile"&gt;ZI's Makefile&lt;/a&gt;.)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;HTML: &lt;code&gt;asciidoctor script.adoc&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Obtain manual pages with &lt;code&gt;Asciidoc&lt;/code&gt; package via: &lt;code&gt;a2x -L --doctype manpage --format manpage file1.zsh.adoc&lt;/code&gt; (&lt;code&gt;asciidoc&lt;/code&gt; is a common package; its &lt;code&gt;a2x&lt;/code&gt; command is little slow).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Github supports &lt;code&gt;Asciidoc&lt;/code&gt; documents and renders them automatically.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>zi</category>
      <category>shell</category>
      <category>zsh</category>
      <category>devops</category>
    </item>
    <item>
      <title>✨〰️ ZI 〰️✨ Annex - Test</title>
      <dc:creator>Emre</dc:creator>
      <pubDate>Thu, 07 Apr 2022 07:46:47 +0000</pubDate>
      <link>https://community.ops.io/zsh/-zi-annex-test-1i75</link>
      <guid>https://community.ops.io/zsh/-zi-annex-test-1i75</guid>
      <description>&lt;p&gt;&lt;a href="https://community.ops.io/images/PxOXrZebj5AbDai_gYqO10eqFupGiKD-zKHMbp4jE4c/w:880/mb:500000/ar:1/aHR0cHM6Ly9jZG4t/aW1hZ2VzLTEubWVk/aXVtLmNvbS9tYXgv/MzIwLzAqRjFzU0tX/eWE4YXhmM0tJWS5w/bmc" class="article-body-image-wrapper"&gt;&lt;img src="https://community.ops.io/images/PxOXrZebj5AbDai_gYqO10eqFupGiKD-zKHMbp4jE4c/w:880/mb:500000/ar:1/aHR0cHM6Ly9jZG4t/aW1hZ2VzLTEubWVk/aXVtLmNvbS9tYXgv/MzIwLzAqRjFzU0tX/eWE4YXhmM0tJWS5w/bmc" alt="ZI Swiss army knife" width="320" height="320"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;a href="https://github.com/z-shell/zi"&gt;❮ ZI ❯&lt;/a&gt; 🧙‍‍♀️ A Swiss Army Knife for Zsh.
&lt;/h3&gt;

&lt;p&gt;Designed to glue everything together. 🔗&lt;/p&gt;

&lt;p&gt;&lt;a href="https://z.digitalclouds.dev"&gt;Website&lt;/a&gt; | &lt;a href="https://github.com/z-shell/"&gt;GitHub&lt;/a&gt; | &lt;a href="https://github.com/orgs/z-shell/discussions/"&gt;Discussions&lt;/a&gt; | &lt;a href="https://crowdin.digitalclouds.dev"&gt;Localize&lt;/a&gt; | &lt;a href="https://z.digitalclouds.dev/ecosystem/annexes/"&gt;Wiki Annexes&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;An annex that runs tests via make or zunit. Run tests after install, setup your own or propose missing. &lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--iL7M7VBe--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://user-images.githubusercontent.com/59910950/162143845-c44ead50-b21a-46c0-8372-18325eb1f33a.gif"&gt;Preview&lt;/a&gt;&lt;/p&gt;


&lt;h2&gt;
  
  
  📥 Install
&lt;/h2&gt;

&lt;p&gt;Zunit install if missing:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;zi for @zunit


zi light z-shell/z-a-test

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  ⚙️ Configuration
&lt;/h2&gt;

&lt;p&gt;To run the tests in a verbose mode, issue:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;zstyle :zi:annex:test quiet 0

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;before installing or updating the plugin. To skip tests for a single plugin,&lt;br&gt;&lt;br&gt;
add &lt;code&gt;notest&lt;/code&gt; ice:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;zi ice notest
zi load …

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  📕 Examples
&lt;/h2&gt;

&lt;p&gt;Example activation in the default quiet mode:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--DRaILtRx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/z-shell/z-a-test/main/docs/images/z-p-test-1.png"&gt;&lt;img src="https://community.ops.io/images/0gaH7kPt8bYIgMqIWxOQsRhYilSLh2uTrQWDVEa8s5A/w:880/mb:500000/ar:1/aHR0cHM6Ly9yZXMu/Y2xvdWRpbmFyeS5j/b20vcHJhY3RpY2Fs/ZGV2L2ltYWdlL2Zl/dGNoL3MtLURSYUlM/dFJ4LS0vY19saW1p/dCUyQ2ZfYXV0byUy/Q2ZsX3Byb2dyZXNz/aXZlJTJDcV9hdXRv/JTJDd184ODAvaHR0/cHM6Ly9yYXcuZ2l0/aHVidXNlcmNvbnRl/bnQuY29tL3otc2hl/bGwvei1hLXRlc3Qv/bWFpbi9kb2NzL2lt/YWdlcy96LXAtdGVz/dC0xLnBuZw" alt="z-a-test activation" width="880" height="73"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Example activation in non-quiet mode:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--RM48Jx8Q--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/z-shell/z-a-test/main/docs/images/z-p-test-2.png"&gt;&lt;img src="https://community.ops.io/images/PdpxfMuquKa-_WCEQE0FM3fmNG2RZlDeeRZBzxElYtE/w:880/mb:500000/ar:1/aHR0cHM6Ly9yZXMu/Y2xvdWRpbmFyeS5j/b20vcHJhY3RpY2Fs/ZGV2L2ltYWdlL2Zl/dGNoL3MtLVJNNDhK/eDhRLS0vY19saW1p/dCUyQ2ZfYXV0byUy/Q2ZsX3Byb2dyZXNz/aXZlJTJDcV9hdXRv/JTJDd184ODAvaHR0/cHM6Ly9yYXcuZ2l0/aHVidXNlcmNvbnRl/bnQuY29tL3otc2hl/bGwvei1hLXRlc3Qv/bWFpbi9kb2NzL2lt/YWdlcy96LXAtdGVz/dC0yLnBuZw" alt="z-a-test activation" width="880" height="394"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>zi</category>
      <category>shell</category>
      <category>zsh</category>
      <category>devops</category>
    </item>
    <item>
      <title>✨〰️ ZI 〰️✨ Zsh String Lib</title>
      <dc:creator>Emre</dc:creator>
      <pubDate>Thu, 31 Mar 2022 02:26:04 +0000</pubDate>
      <link>https://community.ops.io/emre/-zi-zsh-string-lib-ab4</link>
      <guid>https://community.ops.io/emre/-zi-zsh-string-lib-ab4</guid>
      <description>&lt;p&gt;&lt;a href="https://community.ops.io/images/PxOXrZebj5AbDai_gYqO10eqFupGiKD-zKHMbp4jE4c/w:880/mb:500000/ar:1/aHR0cHM6Ly9jZG4t/aW1hZ2VzLTEubWVk/aXVtLmNvbS9tYXgv/MzIwLzAqRjFzU0tX/eWE4YXhmM0tJWS5w/bmc" class="article-body-image-wrapper"&gt;&lt;img src="https://community.ops.io/images/PxOXrZebj5AbDai_gYqO10eqFupGiKD-zKHMbp4jE4c/w:880/mb:500000/ar:1/aHR0cHM6Ly9jZG4t/aW1hZ2VzLTEubWVk/aXVtLmNvbS9tYXgv/MzIwLzAqRjFzU0tX/eWE4YXhmM0tJWS5w/bmc" alt="ZI Swiss army knife" width="320" height="320"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;a href="https://github.com/z-shell/zi"&gt;✨〰️ ZI 〰️✨&lt;/a&gt; A Swiss Army Knife for Zsh.
&lt;/h3&gt;

&lt;p&gt;Designed to glue everything together. 🔗&lt;/p&gt;

&lt;p&gt;&lt;a href="https://z.digitalclouds.dev"&gt;https://z.digitalclouds.dev&lt;/a&gt; | &lt;a href="https://github.com/z-shell/"&gt;GitHub&lt;/a&gt; | &lt;a href="https://github.com/orgs/z-shell/discussions/"&gt;Discussions&lt;/a&gt; | &lt;a href="https://crowdin.digitalclouds.dev"&gt;Localize&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  JSON Parsing
&lt;/h2&gt;

&lt;p&gt;❮ ZI ❯ has it's own &lt;a href="https://z.digitalclouds.dev/ecosystem/packages"&gt;ecosystem of packages&lt;/a&gt;, and here is how you can create your own - 'package.json'.&lt;/p&gt;

&lt;p&gt;A string library for Zsh. Its founding function was parsing of JSON.&lt;/p&gt;




&lt;h3&gt;
  
  
  📋 List Of The Functions
&lt;/h3&gt;

&lt;h4&gt;
  
  
  ✴️ @str-parse-json
&lt;/h4&gt;

&lt;p&gt;Parses the buffer (&lt;code&gt;$1&lt;/code&gt;) with JSON and returns:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Fields for the given key (&lt;code&gt;$2&lt;/code&gt;) in the given hash (&lt;code&gt;$3&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;The hash looks like follows:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   1/1 → strings at the level 1 of the 1st object
   1/2 → strings at the level 1 of the 2nd object
   …
   2/1 → strings at 2nd level of the 1st object
   …

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The strings are parse-able with &lt;code&gt;"${(@Q)${(@z)value}"&lt;/code&gt;, i.e.: they're concatenated and quoted strings found in the JSON.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "zi-ices": {
    "default": {
      "wait": "1",
      "lucid": "",
      "as": "program",
      "pick": "fzy",
      "make": ""
    },
    "bgn": {
      "wait": "1",
      "lucid": "",
      "as": "null",
      "make": "",
      "sbin": "fzy;contrib/fzy-*"
    }
  }
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Will result in:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;local -A Strings
Strings[1/1]="zi-ices"
Strings[2/1]="default $'\0'--object--$'\0' bgn $'\0'--object--$'\0'"
Strings[3/1]='wait 1 lucid \ as program pick fzy make \ '
Strings[3/2]='wait 1 lucid \ as null make \ sbin fzy\;contrib/fzy-\*'

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So that when you e.g.: expect a key &lt;code&gt;bgn&lt;/code&gt; but don't know at which position, you can do:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;local -A Strings
@str-parse-json "$json" "zi-ices" Strings
integer pos
# (I) flag returns index at which the `bgn' string
# has been found in the array – the result of the
# (z)-split of the Strings[2/1] string
pos=${${(@Q)${(@z)Strings[2/1]}}[(I)bgn]}
if (( pos )) {
  local -A ices
  ices=( "${(@Q)${(@z)Strings[3/$(( (pos+1) / 2 ))]}}" )
  # Use the `ices' hash holding the values of the `bgn' object
  …
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Note that the &lt;code&gt;$'\0'&lt;/code&gt; is correctly dequoted by &lt;code&gt;Q&lt;/code&gt; flag into the null byte.&lt;/p&gt;

&lt;p&gt;Arguments:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The buffer with JSON.&lt;/li&gt;
&lt;li&gt;The key in the JSON that should be mapped to the result (i.e.: it's possible to map only a subset of the input). It must be the first key in the object to map.&lt;/li&gt;
&lt;li&gt;The name of the output hash parameter.&lt;/li&gt;
&lt;/ol&gt;




&lt;h4&gt;
  
  
  ✴️ @str-read-all
&lt;/h4&gt;

&lt;p&gt;Consumes whole data from given file descriptor and stores the string under the&lt;br&gt;&lt;br&gt;
given (&lt;code&gt;$2&lt;/code&gt;) parameter, which is &lt;code&gt;REPLY&lt;/code&gt; by default.&lt;/p&gt;

&lt;p&gt;The reason to create this function is speed – it's much faster than &lt;code&gt;read -d ''&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;It can try hard to read the whole data by retrying multiple times (&lt;code&gt;10&lt;/code&gt; by&lt;br&gt;&lt;br&gt;
default) and sleeping before each retry (not done by default).&lt;/p&gt;

&lt;p&gt;Arguments:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;File descriptor (a number; use &lt;code&gt;1&lt;/code&gt; for stdin) to be read from.&lt;/li&gt;
&lt;li&gt;Name of output variable (default: &lt;code&gt;REPLY&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Numer of retries (default: &lt;code&gt;10&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Sleep time after each retry (a float; default: &lt;code&gt;0&lt;/code&gt;).&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;exec {FD}&amp;lt; =( cat /etc/motd )
@str-read-all $FD
print -r -- $REPLY
…

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h4&gt;
  
  
  ✴️ @str-ng-match
&lt;/h4&gt;

&lt;p&gt;Returns a non-greedy match of the given pattern (&lt;code&gt;$2&lt;/code&gt;) in the given string (&lt;code&gt;$1&lt;/code&gt;).&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The string to match in.&lt;/li&gt;
&lt;li&gt;The pattern to match in the string.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Return value:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;$REPLY&lt;/code&gt; – the matched string, if found,&lt;/li&gt;
&lt;li&gt;return code: &lt;code&gt;0&lt;/code&gt; if there was a match found, otherwise &lt;code&gt;1&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;if @str-ng-match "abb" "a*b"; then
  print -r -- $REPLY
fi
Output: ab

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h4&gt;
  
  
  ✴️ @str-ng-matches
&lt;/h4&gt;

&lt;p&gt;Returns all non-greedy matches of the given pattern in the given list of&lt;br&gt;&lt;br&gt;
strings.&lt;/p&gt;

&lt;p&gt;Input:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;$1&lt;/code&gt; … &lt;code&gt;$n-1&lt;/code&gt; - the strings to match in,&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;$n&lt;/code&gt; - the pattern to match in the strings.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Return value:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;$reply&lt;/code&gt; – contains all the matches,&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;$REPLY&lt;/code&gt; - holds the first match,&lt;/li&gt;
&lt;li&gt;return code: &lt;code&gt;0&lt;/code&gt; if there was any match found, otherwise &lt;code&gt;1&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;arr=( a1xx ayy a2xx )
if @str-ng-matches ${arr[@]} "a*x"; then
   print -rl -- $reply
fi
Outout:
a1x
a2x

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h4&gt;
  
  
  ✴️ @str-read-ini
&lt;/h4&gt;

&lt;p&gt;Reads an INI file.&lt;/p&gt;

&lt;p&gt;Arguments:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Path to the ini file to parse.&lt;/li&gt;
&lt;li&gt;Name of output hash (&lt;code&gt;INI&lt;/code&gt; by default).&lt;/li&gt;
&lt;li&gt;Prefix for keys in the hash (can be empty).&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Writes to given hash under keys built in following way: &lt;code&gt;${3}&amp;lt;section&amp;gt;_field&lt;/code&gt;.&lt;br&gt;&lt;br&gt;
Values are the values from the ini file.&lt;/p&gt;


&lt;h4&gt;
  
  
  ✴️ @str-read-toml
&lt;/h4&gt;

&lt;p&gt;Reads a TOML file with support for single-level array.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Path to the TOML file to parse.&lt;/li&gt;
&lt;li&gt;Name of output hash (&lt;code&gt;TOML&lt;/code&gt; by default).&lt;/li&gt;
&lt;li&gt;Prefix for keys in the hash (can be empty).&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Writes to given hash under keys built in following way: &lt;code&gt;${3}&amp;lt;section&amp;gt;_field&lt;/code&gt;.&lt;br&gt;&lt;br&gt;
Values are the values from the TOML file.&lt;/p&gt;

&lt;p&gt;The values can be quoted and concatenated strings if they're an array. For&lt;br&gt;&lt;br&gt;
example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[sec]
array = [val1, "value 2", value&amp;amp;3]

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then the fields of the hash will be:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;TOML[&amp;lt;sec&amp;gt;_array]="val1 value\ 2 value\&amp;amp;3"

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To retrieve the array stored in such way, use the substitution &lt;code&gt;"${(@Q)${(@z)TOML[&amp;lt;sec&amp;gt;_array]}}"&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;local -a array
array=( "${(@Q)${(@z)TOML[&amp;lt;sec&amp;gt;_array]}}" )

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;(The substitution first splits the input string as if Zsh would split it on the command line – with the &lt;code&gt;(z)&lt;/code&gt; flag, and then removes one level of quoting with the &lt;code&gt;(Q)&lt;/code&gt; flag).&lt;/p&gt;




&lt;h4&gt;
  
  
  ✴️ @str-dump
&lt;/h4&gt;

&lt;p&gt;Dumps the contents of the variable, whether it's being a scalar, an array or&lt;br&gt;&lt;br&gt;
a hash. The contents of the hash are sorted on the keys numerically, i.e.: by&lt;br&gt;&lt;br&gt;
using &lt;code&gt;(on)&lt;/code&gt; flags.&lt;/p&gt;

&lt;p&gt;An option &lt;code&gt;-q&lt;/code&gt; can be provided: it'll enable quoting of the printed data with&lt;br&gt;&lt;br&gt;
the &lt;code&gt;q&lt;/code&gt;-flag (i.e.: backslash quoting).&lt;/p&gt;

&lt;p&gt;Basically, the function Is an alternative to &lt;code&gt;declare -p&lt;/code&gt;, with a different&lt;br&gt;&lt;br&gt;
output format, more dump-like.&lt;/p&gt;

&lt;p&gt;Arguments:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The name of the variable of which contents should be dumped.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;array=( "" "a value" "test" )
@str-dump -q array

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;''
a\ value
test


typeset -A hash=( "a key" "a value" key value )
@str-dump -q hash

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;a\ key: a\ value
key: value

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>zi</category>
      <category>shell</category>
      <category>zsh</category>
      <category>devops</category>
    </item>
    <item>
      <title>✨〰️ ZI 〰️✨ Feature-rich Syntax Highlighting</title>
      <dc:creator>Emre</dc:creator>
      <pubDate>Wed, 30 Mar 2022 07:21:42 +0000</pubDate>
      <link>https://community.ops.io/zsh/-zi-feature-rich-syntax-highlighting-52j0</link>
      <guid>https://community.ops.io/zsh/-zi-feature-rich-syntax-highlighting-52j0</guid>
      <description>&lt;p&gt;&lt;a href="https://community.ops.io/images/PxOXrZebj5AbDai_gYqO10eqFupGiKD-zKHMbp4jE4c/w:880/mb:500000/ar:1/aHR0cHM6Ly9jZG4t/aW1hZ2VzLTEubWVk/aXVtLmNvbS9tYXgv/MzIwLzAqRjFzU0tX/eWE4YXhmM0tJWS5w/bmc" class="article-body-image-wrapper"&gt;&lt;img src="https://community.ops.io/images/PxOXrZebj5AbDai_gYqO10eqFupGiKD-zKHMbp4jE4c/w:880/mb:500000/ar:1/aHR0cHM6Ly9jZG4t/aW1hZ2VzLTEubWVk/aXVtLmNvbS9tYXgv/MzIwLzAqRjFzU0tX/eWE4YXhmM0tJWS5w/bmc" alt="ZI Swiss army knife" width="320" height="320"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;a href="https://github.com/z-shell/zi"&gt;❮ ZI ❯&lt;/a&gt; 🧙‍‍♀️ A Swiss Army Knife for Zsh.
&lt;/h3&gt;

&lt;p&gt;Designed to glue everything together. 🔗&lt;/p&gt;

&lt;p&gt;&lt;a href="https://z.digitalclouds.dev"&gt;https://z.digitalclouds.dev&lt;/a&gt; | &lt;a href="https://github.com/z-shell/"&gt;GitHub&lt;/a&gt; | &lt;a href="https://github.com/orgs/z-shell/discussions/"&gt;Discussions&lt;/a&gt; | &lt;a href="https://crowdin.digitalclouds.dev"&gt;Localize&lt;/a&gt;&lt;/p&gt;




&lt;h4&gt;
  
  
  Fast-Syntax-Highlighting Themes (Zshell)
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://asciinema.org/a/183814"&gt;&lt;img src="https://community.ops.io/images/xjgIC3CYMmw8zH8kQdYcZS-r61h34WpuvRbCFe5ds8E/w:880/mb:500000/ar:1/aHR0cHM6Ly9yZXMu/Y2xvdWRpbmFyeS5j/b20vcHJhY3RpY2Fs/ZGV2L2ltYWdlL2Zl/dGNoL3MtLXdDWlhJ/S2YwLS0vY19saW1p/dCUyQ2ZfYXV0byUy/Q2ZsX3Byb2dyZXNz/aXZlJTJDcV9hdXRv/JTJDd184ODAvaHR0/cHM6Ly9hc2NpaW5l/bWEub3JnL2EvMTgz/ODE0LnN2Zw" alt="" width="835" height="470"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h4&gt;
  
  
  Recursive fast-syntax-highlighting, highlights code passed to sh -c
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://asciinema.org/a/186349"&gt;&lt;img src="https://community.ops.io/images/yMcO2uGFLbWwXjQnSvQsf68uKKc-jYVMb0Cu3UAr-FI/w:880/mb:500000/ar:1/aHR0cHM6Ly9yZXMu/Y2xvdWRpbmFyeS5j/b20vcHJhY3RpY2Fs/ZGV2L2ltYWdlL2Zl/dGNoL3MtLUd2ZzE3/UklxLS0vY19saW1p/dCUyQ2ZfYXV0byUy/Q2ZsX3Byb2dyZXNz/aXZlJTJDcV9hdXRv/JTJDd184ODAvaHR0/cHM6Ly9hc2NpaW5l/bWEub3JnL2EvMTg2/MzQ5LnN2Zw" alt="" width="649" height="372"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Installation

&lt;ul&gt;
&lt;li&gt;Manual&lt;/li&gt;
&lt;li&gt;ZI&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;Features

&lt;ul&gt;
&lt;li&gt;Themes&lt;/li&gt;
&lt;li&gt;Variables&lt;/li&gt;
&lt;li&gt;Brackets&lt;/li&gt;
&lt;li&gt;Conditions&lt;/li&gt;
&lt;li&gt;Strings&lt;/li&gt;
&lt;li&gt;here-strings&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;exec&lt;/code&gt; descriptor-variables&lt;/li&gt;
&lt;li&gt;for-loops and alternate syntax (brace &lt;code&gt;{&lt;/code&gt;/&lt;code&gt;}&lt;/code&gt; blocks)&lt;/li&gt;
&lt;li&gt;Function definitions&lt;/li&gt;
&lt;li&gt;Recursive &lt;code&gt;eval&lt;/code&gt; and &lt;code&gt;$( )&lt;/code&gt; highlighting&lt;/li&gt;
&lt;li&gt;Chroma functions&lt;/li&gt;
&lt;li&gt;Math-mode highlighting&lt;/li&gt;
&lt;li&gt;Zcalc highlighting&lt;/li&gt;
&lt;li&gt;Performance&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  📥 Installation
&lt;/h3&gt;

&lt;p&gt;Post install try: &lt;code&gt;fast-theme -t z-shell&lt;/code&gt;. To enable: &lt;code&gt;fast-theme z-shell&lt;/code&gt;.&lt;/p&gt;




&lt;h3&gt;
  
  
  📕 Manual Installation
&lt;/h3&gt;

&lt;p&gt;Clone the Repository.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git clone https://github.com/z-shell/F-Sy-H ~/path/to/fsh

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And add the following to your &lt;code&gt;zshrc&lt;/code&gt; file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;source ~/path/to/fsh/F-Sy-H.plugin.zsh

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  &lt;a href="https://github.com/z-shell/zi"&gt;ZI&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Add the following to your &lt;code&gt;zshrc&lt;/code&gt; file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;zi light z-shell/F-Sy-H

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here's an example of how to load the plugin together with a few other popular ones with the use of &lt;a href="https://z.digitalclouds.dev/docs/getting_started/overview/#turbo-mode-zsh--53"&gt;Turbo mode&lt;/a&gt;, i.e.: speeding up the Zsh startup by loading the plugin right after the first prompt, in background:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;zi wait lucid for \
 atinit"ZI[COMPINIT_OPTS]=-C; zicompinit; zicdreplay" \
    z-shell/F-Sy-H \
 blockf \
    zsh-users/zsh-completions \
 atload"!_zsh_autosuggest_start" \
    zsh-users/zsh-autosuggestions

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Features
&lt;/h2&gt;

&lt;h3&gt;
  
  
  ✴️ Themes
&lt;/h3&gt;

&lt;p&gt;Switch themes via &lt;code&gt;fast-theme {theme-name}&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--uOq5CL4j--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://github.com/z-shell/F-Sy-H/raw/main/docs/images/theme.png"&gt;&lt;img src="https://community.ops.io/images/gBOOS-ARMc--AOwBbQvl4cdefGTeJqNwyhDsTxdv1Qg/w:880/mb:500000/ar:1/aHR0cHM6Ly9yZXMu/Y2xvdWRpbmFyeS5j/b20vcHJhY3RpY2Fs/ZGV2L2ltYWdlL2Zl/dGNoL3MtLXVPcTVD/TDRqLS0vY19saW1p/dCUyQ2ZfYXV0byUy/Q2ZsX3Byb2dyZXNz/aXZlJTJDcV9hdXRv/JTJDd184ODAvaHR0/cHM6Ly9naXRodWIu/Y29tL3otc2hlbGwv/Ri1TeS1IL3Jhdy9t/YWluL2RvY3MvaW1h/Z2VzL3RoZW1lLnBu/Zw" alt="image1" width="747" height="315"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Run &lt;code&gt;fast-theme -t {theme-name}&lt;/code&gt; option to obtain the snippet above.&lt;/p&gt;

&lt;p&gt;Run &lt;code&gt;fast-theme -l&lt;/code&gt; to list available themes.&lt;/p&gt;




&lt;h3&gt;
  
  
  ✴️ Variables
&lt;/h3&gt;

&lt;p&gt;Comparing to the project &lt;code&gt;zsh-users/zsh-syntax-highlighting&lt;/code&gt; (the upper line):&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--5yfB_rf0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://github.com/z-shell/F-Sy-H/raw/main/docs/images/parameter.png"&gt;&lt;img src="https://community.ops.io/images/pCiVNA6hQ2j9XkDQ-ZdT-A3sMQLRuxF1QcAqKXt8w-k/w:880/mb:500000/ar:1/aHR0cHM6Ly9yZXMu/Y2xvdWRpbmFyeS5j/b20vcHJhY3RpY2Fs/ZGV2L2ltYWdlL2Zl/dGNoL3MtLTV5ZkJf/cmYwLS0vY19saW1p/dCUyQ2ZfYXV0byUy/Q2ZsX3Byb2dyZXNz/aXZlJTJDcV9hdXRv/JTJDd184ODAvaHR0/cHM6Ly9naXRodWIu/Y29tL3otc2hlbGwv/Ri1TeS1IL3Jhdy9t/YWluL2RvY3MvaW1h/Z2VzL3BhcmFtZXRl/ci5wbmc" alt="image could not be loaded" width="140" height="52"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--QS5npF0r--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://github.com/z-shell/F-Sy-H/raw/main/docs/images/in_string.png"&gt;&lt;img src="https://community.ops.io/images/bb2DV1eBDKrMPk0GK0uu4BBar4OSzpPS9uYHwMIarqk/w:880/mb:500000/ar:1/aHR0cHM6Ly9yZXMu/Y2xvdWRpbmFyeS5j/b20vcHJhY3RpY2Fs/ZGV2L2ltYWdlL2Zl/dGNoL3MtLVFTNW5w/RjByLS0vY19saW1p/dCUyQ2ZfYXV0byUy/Q2ZsX3Byb2dyZXNz/aXZlJTJDcV9hdXRv/JTJDd184ODAvaHR0/cHM6Ly9naXRodWIu/Y29tL3otc2hlbGwv/Ri1TeS1IL3Jhdy9t/YWluL2RvY3MvaW1h/Z2VzL2luX3N0cmlu/Zy5wbmc" alt="image could not be loaded" width="370" height="52"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  ✴️ Brackets
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--NCkHPigC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://github.com/z-shell/F-Sy-H/raw/main/docs/images/brackets.gif"&gt;&lt;img src="https://community.ops.io/images/620ktlUx8w8u0TuA4Pt-oknAxYvMLYGb-dvQdzoDss8/w:880/mb:500000/ar:1/aHR0cHM6Ly9yZXMu/Y2xvdWRpbmFyeS5j/b20vcHJhY3RpY2Fs/ZGV2L2ltYWdlL2Zl/dGNoL3MtLU5Da0hQ/aWdDLS0vY19saW1p/dCUyQ2ZfYXV0byUy/Q2ZsX3Byb2dyZXNz/aXZlJTJDcV82NiUy/Q3dfODgwL2h0dHBz/Oi8vZ2l0aHViLmNv/bS96LXNoZWxsL0Yt/U3ktSC9yYXcvbWFp/bi9kb2NzL2ltYWdl/cy9icmFja2V0cy5n/aWY" alt="image could not be loaded" width="" height=""&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  ✴️ Conditions
&lt;/h3&gt;

&lt;p&gt;Comparing to the project &lt;code&gt;zsh-users/zsh-syntax-highlighting&lt;/code&gt; (the upper line):&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--d0ZsiYMu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://github.com/z-shell/F-Sy-H/raw/main/docs/images/cplx_cond.png"&gt;&lt;img src="https://community.ops.io/images/dVGulupETy460PFyitE3HgT0srAn5J9L0XT6S9R2-fg/w:880/mb:500000/ar:1/aHR0cHM6Ly9yZXMu/Y2xvdWRpbmFyeS5j/b20vcHJhY3RpY2Fs/ZGV2L2ltYWdlL2Zl/dGNoL3MtLWQwWnNp/WU11LS0vY19saW1p/dCUyQ2ZfYXV0byUy/Q2ZsX3Byb2dyZXNz/aXZlJTJDcV9hdXRv/JTJDd184ODAvaHR0/cHM6Ly9naXRodWIu/Y29tL3otc2hlbGwv/Ri1TeS1IL3Jhdy9t/YWluL2RvY3MvaW1h/Z2VzL2NwbHhfY29u/ZC5wbmc" alt="image could not be loaded" width="250" height="52"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Strings
&lt;/h2&gt;

&lt;p&gt;Exact highlighting that recognizes quotings.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--kn9P2ceQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://github.com/z-shell/F-Sy-H/raw/main/docs/images/ideal-string.png"&gt;&lt;img src="https://community.ops.io/images/4GsPcnYWmjpT6fzuuZP_38oMn-qS4GoFkM7g2pjF5wU/w:880/mb:500000/ar:1/aHR0cHM6Ly9yZXMu/Y2xvdWRpbmFyeS5j/b20vcHJhY3RpY2Fs/ZGV2L2ltYWdlL2Zl/dGNoL3MtLWtuOVAy/Y2VRLS0vY19saW1p/dCUyQ2ZfYXV0byUy/Q2ZsX3Byb2dyZXNz/aXZlJTJDcV9hdXRv/JTJDd184ODAvaHR0/cHM6Ly9naXRodWIu/Y29tL3otc2hlbGwv/Ri1TeS1IL3Jhdy9t/YWluL2RvY3MvaW1h/Z2VzL2lkZWFsLXN0/cmluZy5wbmc" alt="image could not be loaded" width="880" height="41"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  ✴️ here-strings
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--LoaxJwfd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://github.com/z-shell/F-Sy-H/raw/main/docs/images/herestring.png"&gt;&lt;img src="https://community.ops.io/images/jL01cwXb6yKxtWFGKy5FvdD3dpf28sGwg-czeBntWJM/w:880/mb:500000/ar:1/aHR0cHM6Ly9yZXMu/Y2xvdWRpbmFyeS5j/b20vcHJhY3RpY2Fs/ZGV2L2ltYWdlL2Zl/dGNoL3MtLUxvYXhK/d2ZkLS0vY19saW1p/dCUyQ2ZfYXV0byUy/Q2ZsX3Byb2dyZXNz/aXZlJTJDcV9hdXRv/JTJDd184ODAvaHR0/cHM6Ly9naXRodWIu/Y29tL3otc2hlbGwv/Ri1TeS1IL3Jhdy9t/YWluL2RvY3MvaW1h/Z2VzL2hlcmVzdHJp/bmcucG5n" alt="image could not be loaded" width="600" height="33"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  ✴️ &lt;code&gt;exec&lt;/code&gt; descriptor-variables
&lt;/h3&gt;

&lt;p&gt;Comparing to the project &lt;code&gt;zsh-users/zsh-syntax-highlighting&lt;/code&gt; (the upper line):&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--R4uA-Pa_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://github.com/z-shell/F-Sy-H/raw/main/docs/images/execfd_cmp.png"&gt;&lt;img src="https://community.ops.io/images/YlI7Jx4hRHH-UWEX9s_ByHr35-wF3BENy7J7GeR9xp4/w:880/mb:500000/ar:1/aHR0cHM6Ly9yZXMu/Y2xvdWRpbmFyeS5j/b20vcHJhY3RpY2Fs/ZGV2L2ltYWdlL2Zl/dGNoL3MtLVI0dUEt/UGFfLS0vY19saW1p/dCUyQ2ZfYXV0byUy/Q2ZsX3Byb2dyZXNz/aXZlJTJDcV9hdXRv/JTJDd184ODAvaHR0/cHM6Ly9naXRodWIu/Y29tL3otc2hlbGwv/Ri1TeS1IL3Jhdy9t/YWluL2RvY3MvaW1h/Z2VzL2V4ZWNmZF9j/bXAucG5n" alt="image could not be loaded" width="223" height="56"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  ✴️ for-loops and alternate syntax (brace &lt;code&gt;{&lt;/code&gt;/&lt;code&gt;}&lt;/code&gt; blocks)
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--CFfU_8PK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://github.com/z-shell/F-Sy-H/raw/main/docs/images/for-loop-cmp.png"&gt;&lt;img src="https://community.ops.io/images/tTgVkq2ROThVVRPbGQu0K6I_nChpb1zof6TVsGO_X6s/w:880/mb:500000/ar:1/aHR0cHM6Ly9yZXMu/Y2xvdWRpbmFyeS5j/b20vcHJhY3RpY2Fs/ZGV2L2ltYWdlL2Zl/dGNoL3MtLUNGZlVf/OFBLLS0vY19saW1p/dCUyQ2ZfYXV0byUy/Q2ZsX3Byb2dyZXNz/aXZlJTJDcV9hdXRv/JTJDd184ODAvaHR0/cHM6Ly9naXRodWIu/Y29tL3otc2hlbGwv/Ri1TeS1IL3Jhdy9t/YWluL2RvY3MvaW1h/Z2VzL2Zvci1sb29w/LWNtcC5wbmc" alt="image could not be loaded" width="460" height="63"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  ✴️ Function definitions
&lt;/h3&gt;

&lt;p&gt;Comparing to the project &lt;code&gt;zsh-users/zsh-syntax-highlighting&lt;/code&gt; (the upper 2 lines):&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--M8HBnuR2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://github.com/z-shell/F-Sy-H/raw/main/docs/images/function.png"&gt;&lt;img src="https://community.ops.io/images/5VuB63cOo3AmCCfpWQEucainLb1zEA1ahrbVeYjC3Zc/w:880/mb:500000/ar:1/aHR0cHM6Ly9yZXMu/Y2xvdWRpbmFyeS5j/b20vcHJhY3RpY2Fs/ZGV2L2ltYWdlL2Zl/dGNoL3MtLU04SEJu/dVIyLS0vY19saW1p/dCUyQ2ZfYXV0byUy/Q2ZsX3Byb2dyZXNz/aXZlJTJDcV9hdXRv/JTJDd184ODAvaHR0/cHM6Ly9naXRodWIu/Y29tL3otc2hlbGwv/Ri1TeS1IL3Jhdy9t/YWluL2RvY3MvaW1h/Z2VzL2Z1bmN0aW9u/LnBuZw" alt="image could not be loaded" width="338" height="88"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  ✴️ Recursive &lt;code&gt;eval&lt;/code&gt; and &lt;code&gt;$( )&lt;/code&gt; highlighting
&lt;/h3&gt;

&lt;p&gt;Comparing to the project &lt;code&gt;zsh-users/zsh-syntax-highlighting&lt;/code&gt; (the upper line):&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--X30dkDVF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://github.com/z-shell/F-Sy-H/raw/main/docs/images/eval_cmp.png"&gt;&lt;img src="https://community.ops.io/images/7Hc_KLS0p2uIKEf1bRqgbMuMC7GtC-lNMCTAUXLpKuQ/w:880/mb:500000/ar:1/aHR0cHM6Ly9yZXMu/Y2xvdWRpbmFyeS5j/b20vcHJhY3RpY2Fs/ZGV2L2ltYWdlL2Zl/dGNoL3MtLVgzMGRr/RFZGLS0vY19saW1p/dCUyQ2ZfYXV0byUy/Q2ZsX3Byb2dyZXNz/aXZlJTJDcV9hdXRv/JTJDd184ODAvaHR0/cHM6Ly9naXRodWIu/Y29tL3otc2hlbGwv/Ri1TeS1IL3Jhdy9t/YWluL2RvY3MvaW1h/Z2VzL2V2YWxfY21w/LnBuZw" alt="image could not be loaded" width="518" height="49"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  ✴️ Chroma functions
&lt;/h3&gt;

&lt;p&gt;Highlighting that is specific for a given command.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--pp2Z4gDR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://github.com/z-shell/F-Sy-H/raw/main/docs/images/git_chroma.png"&gt;&lt;img src="https://community.ops.io/images/SGt8V7agtpopRhX6e8P0yCHTmener9G-pjsq3KiaHhY/w:880/mb:500000/ar:1/aHR0cHM6Ly9yZXMu/Y2xvdWRpbmFyeS5j/b20vcHJhY3RpY2Fs/ZGV2L2ltYWdlL2Zl/dGNoL3MtLXBwMlo0/Z0RSLS0vY19saW1p/dCUyQ2ZfYXV0byUy/Q2ZsX3Byb2dyZXNz/aXZlJTJDcV9hdXRv/JTJDd184ODAvaHR0/cHM6Ly9naXRodWIu/Y29tL3otc2hlbGwv/Ri1TeS1IL3Jhdy9t/YWluL2RvY3MvaW1h/Z2VzL2dpdF9jaHJv/bWEucG5n" alt="" width="880" height="44"&gt;&lt;/a&gt; alt="image could not be loaded"&lt;br&gt;&lt;br&gt;
 style="color:red;background-color:black;font-weight:bold" /&amp;gt;&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://github.com/z-shell/F-Sy-H/tree/main/chroma"&gt;chromas&lt;/a&gt;&lt;br&gt;&lt;br&gt;
that are enabled by default can be found&lt;br&gt;&lt;br&gt;
&lt;a href="https://github.com/z-shell/F-Sy-H/blob/main/fast-highlight#L166"&gt;here&lt;/a&gt;.&lt;/p&gt;




&lt;h3&gt;
  
  
  ✴️ Math-mode highlighting
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--fLZzm1Vm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://github.com/z-shell/F-Sy-H/raw/main/docs/images/math.gif"&gt;&lt;img src="https://community.ops.io/images/daWkw1mzt61uroY7mIzBjPS1844wldBfJ9qbjLi3jwc/w:880/mb:500000/ar:1/aHR0cHM6Ly9yZXMu/Y2xvdWRpbmFyeS5j/b20vcHJhY3RpY2Fs/ZGV2L2ltYWdlL2Zl/dGNoL3MtLWZMWnpt/MVZtLS0vY19saW1p/dCUyQ2ZfYXV0byUy/Q2ZsX3Byb2dyZXNz/aXZlJTJDcV82NiUy/Q3dfODgwL2h0dHBz/Oi8vZ2l0aHViLmNv/bS96LXNoZWxsL0Yt/U3ktSC9yYXcvbWFp/bi9kb2NzL2ltYWdl/cy9tYXRoLmdpZg" alt="image could not be loaded" width="" height=""&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  ✴️ Zcalc highlighting
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--TOs22JO0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://github.com/z-shell/F-Sy-H/raw/main/docs/images/zcalc.png"&gt;&lt;img src="https://community.ops.io/images/62mex8ngd7BsmY4uKD6_xiDDonKgEkrKpmcfwGmAtD0/w:880/mb:500000/ar:1/aHR0cHM6Ly9yZXMu/Y2xvdWRpbmFyeS5j/b20vcHJhY3RpY2Fs/ZGV2L2ltYWdlL2Zl/dGNoL3MtLVRPczIy/Sk8wLS0vY19saW1p/dCUyQ2ZfYXV0byUy/Q2ZsX3Byb2dyZXNz/aXZlJTJDcV9hdXRv/JTJDd184ODAvaHR0/cHM6Ly9naXRodWIu/Y29tL3otc2hlbGwv/Ri1TeS1IL3Jhdy9t/YWluL2RvY3MvaW1h/Z2VzL3pjYWxjLnBu/Zw" alt="image could not be loaded" width="508" height="51"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Performance
&lt;/h2&gt;

&lt;p&gt;Performance differences can be observed in this Asciinema recording, where a &lt;code&gt;10 kB&lt;/code&gt; function is being edited.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://asciinema.org/a/112367"&gt;&lt;br&gt;&lt;br&gt;
 &lt;img src="https://community.ops.io/images/jpbrzq85yBUeAvwxwD1CT_hfoSjMvhpFRbAPKisQM8U/w:880/mb:500000/ar:1/aHR0cHM6Ly9yZXMu/Y2xvdWRpbmFyeS5j/b20vcHJhY3RpY2Fs/ZGV2L2ltYWdlL2Zl/dGNoL3MtLTFudDJf/ODIzLS0vY19saW1p/dCUyQ2ZfYXV0byUy/Q2ZsX3Byb2dyZXNz/aXZlJTJDcV9hdXRv/JTJDd184ODAvaHR0/cHM6Ly9hc2NpaW5l/bWEub3JnL2EvMTEy/MzY3LnBuZw" alt="asciicast" width="880" height="449"&gt;&lt;br&gt;&lt;br&gt;
&lt;/a&gt;&lt;/p&gt;

</description>
      <category>zi</category>
      <category>shell</category>
      <category>zsh</category>
      <category>devops</category>
    </item>
    <item>
      <title>✨〰️ ZI 〰️✨ Zsh-Py3-HTTP | Auto Spawned service</title>
      <dc:creator>Emre</dc:creator>
      <pubDate>Sun, 27 Mar 2022 22:16:33 +0000</pubDate>
      <link>https://community.ops.io/zsh/-zi-zsh-py3-http-auto-spawned-service-545</link>
      <guid>https://community.ops.io/zsh/-zi-zsh-py3-http-auto-spawned-service-545</guid>
      <description>&lt;p&gt;&lt;a href="https://community.ops.io/images/PxOXrZebj5AbDai_gYqO10eqFupGiKD-zKHMbp4jE4c/w:880/mb:500000/ar:1/aHR0cHM6Ly9jZG4t/aW1hZ2VzLTEubWVk/aXVtLmNvbS9tYXgv/MzIwLzAqRjFzU0tX/eWE4YXhmM0tJWS5w/bmc" class="article-body-image-wrapper"&gt;&lt;img src="https://community.ops.io/images/PxOXrZebj5AbDai_gYqO10eqFupGiKD-zKHMbp4jE4c/w:880/mb:500000/ar:1/aHR0cHM6Ly9jZG4t/aW1hZ2VzLTEubWVk/aXVtLmNvbS9tYXgv/MzIwLzAqRjFzU0tX/eWE4YXhmM0tJWS5w/bmc" alt="ZI Swiss army knife" width="320" height="320"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;a href="https://github.com/z-shell/zi"&gt;❮ ZI ❯&lt;/a&gt; 🧙‍‍♀️ A Swiss Army Knife for Zsh.
&lt;/h3&gt;

&lt;p&gt;Designed to glue everything together. 🔗&lt;/p&gt;

&lt;p&gt;&lt;a href="https://z.digitalclouds.dev"&gt;https://z.digitalclouds.dev&lt;/a&gt; | &lt;a href="https://github.com/z-shell/"&gt;GitHub&lt;/a&gt; | &lt;a href="https://github.com/orgs/z-shell/discussions/"&gt;Discussions&lt;/a&gt; | &lt;a href="https://crowdin.digitalclouds.dev"&gt;Localize&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;This &lt;strong&gt;Zsh&lt;/strong&gt; service-plugin will serve given directory &lt;em&gt;(plugin's directory by default)&lt;/em&gt; using &lt;strong&gt;Python's 3 HTTP server&lt;/strong&gt;.&lt;/p&gt;




&lt;h3&gt;
  
  
  📥 Install with ❮ &lt;a href="https://github.com/z-shell/zi/"&gt;ZI&lt;/a&gt; ❯
&lt;/h3&gt;

&lt;p&gt;The service-plugin supports loading single plugin instance per all active Zsh sessions, in background.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;zi ice service'py3http'
zi light z-shell/zservice-py3http

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h3&gt;
  
  
  🧮 Explanation of Zsh-spawned services
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;First Zsh instance that will gain a lock will spawn the service.&lt;/li&gt;
&lt;li&gt;Other Zsh instances will wait.&lt;/li&gt;
&lt;li&gt;When you close the initial Zsh session, another Zsh will gain lock and resume the service.&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>zi</category>
      <category>shell</category>
      <category>zsh</category>
      <category>devops</category>
    </item>
    <item>
      <title>✨〰️ ZI 〰️✨ Gems &amp; Node Modules With ZI</title>
      <dc:creator>Emre</dc:creator>
      <pubDate>Sun, 27 Mar 2022 22:07:30 +0000</pubDate>
      <link>https://community.ops.io/zsh/-zi-gems-node-modules-with-zi-24be</link>
      <guid>https://community.ops.io/zsh/-zi-gems-node-modules-with-zi-24be</guid>
      <description>&lt;p&gt;&lt;a href="https://community.ops.io/images/PxOXrZebj5AbDai_gYqO10eqFupGiKD-zKHMbp4jE4c/w:880/mb:500000/ar:1/aHR0cHM6Ly9jZG4t/aW1hZ2VzLTEubWVk/aXVtLmNvbS9tYXgv/MzIwLzAqRjFzU0tX/eWE4YXhmM0tJWS5w/bmc" class="article-body-image-wrapper"&gt;&lt;img src="https://community.ops.io/images/PxOXrZebj5AbDai_gYqO10eqFupGiKD-zKHMbp4jE4c/w:880/mb:500000/ar:1/aHR0cHM6Ly9jZG4t/aW1hZ2VzLTEubWVk/aXVtLmNvbS9tYXgv/MzIwLzAqRjFzU0tX/eWE4YXhmM0tJWS5w/bmc" alt="ZI Swiss army knife" width="320" height="320"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;a href="https://github.com/z-shell/zi"&gt;❮ ZI ❯&lt;/a&gt; 🧙‍‍♀️ A Swiss Army Knife for Zsh.
&lt;/h3&gt;

&lt;p&gt;Designed to glue everything together. 🔗&lt;/p&gt;

&lt;p&gt;&lt;a href="https://z.digitalclouds.dev"&gt;https://z.digitalclouds.dev&lt;/a&gt; | &lt;a href="https://github.com/z-shell/"&gt;GitHub&lt;/a&gt; | &lt;a href="https://github.com/orgs/z-shell/discussions/"&gt;Discussions&lt;/a&gt; | &lt;a href="https://crowdin.digitalclouds.dev"&gt;Localize&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;With use of the &lt;a href="https://github.com/z-shell/z-a-bin-gem-node"&gt;bin-gem-node&lt;/a&gt; annex you can install Ruby Gems and Node modules in an interesting way:&lt;/p&gt;

&lt;p&gt;✴️ they'll be installed in the plugin's or snippet's directory,&lt;br&gt;
✴️ an automatic function will be provided to run the binary that's provided by the package.&lt;/p&gt;



&lt;p&gt;This has several benefits. For example, no &lt;code&gt;$PATH&lt;/code&gt; alteration is required in the &lt;code&gt;.zprofile&lt;/code&gt; file. Also, the package will be automatically updated on &lt;code&gt;zi update&lt;/code&gt;. Plus, the installation will be isolated from other packages – multiple packages not be put in a single place.&lt;/p&gt;

&lt;p&gt;An example ZI invocation that installs the &lt;code&gt;remark&lt;/code&gt; tool that can be used to convert Markdown documents into man pages:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;zi ice wait'2' lucid id-as'remark' node'remark &amp;lt;- !remark-cli; remark-man'
zi snippet /dev/null

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It is snippet-based. An example plugin-based invocation:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;zi ice wait'2' lucid id-as'remark' node'remark &amp;lt;- !remark-cli; remark-man'
zi load z-shell/null

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It has an advantage – it will delete the &lt;code&gt;remark&lt;/code&gt; function when unloading the plugin.&lt;/p&gt;

&lt;p&gt;The exclamation-mark before &lt;code&gt;!remark-cli&lt;/code&gt; is important – it causes the automatic function invoking the binary to be created.&lt;/p&gt;

&lt;p&gt;More information can be found on the &lt;a href="https://github.com/z-shell/z-a-bin-gem-node"&gt;bin-gem-node annex page&lt;/a&gt;.&lt;/p&gt;




&lt;p&gt;The command installs 2 node modules – &lt;code&gt;remark-cli&lt;/code&gt; and &lt;code&gt;remark-man&lt;/code&gt; (the backend for the &lt;code&gt;remark&lt;/code&gt; converter – &lt;code&gt;remark&lt;/code&gt; can convert also to other formats).&lt;/p&gt;

&lt;p&gt;By using the exclamation-mark and the &lt;code&gt;&amp;lt;-&lt;/code&gt; pointer it also requests the function that will run the &lt;code&gt;remark&lt;/code&gt; binary to be created. The function has the following body:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;remark () {
    local bindir="/root/.zi/plugins/remark/node_modules/.bin"
        local -x NODE_PATH="/root/.zi/plugins/remark2"/node_modules
        "$bindir"/"remark" "$@"
}

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As it can be seen it ultimately provides the &lt;code&gt;remark&lt;/code&gt; tool to the command line.&lt;/p&gt;

</description>
      <category>zi</category>
      <category>shell</category>
      <category>zsh</category>
      <category>devops</category>
    </item>
    <item>
      <title>✨〰️ ZI 〰️✨ Nickname a Plugin or Snippet</title>
      <dc:creator>Emre</dc:creator>
      <pubDate>Sun, 27 Mar 2022 22:03:32 +0000</pubDate>
      <link>https://community.ops.io/zsh/-zi-nickname-a-plugin-or-snippet-5de0</link>
      <guid>https://community.ops.io/zsh/-zi-nickname-a-plugin-or-snippet-5de0</guid>
      <description>&lt;p&gt;&lt;a href="https://community.ops.io/images/PxOXrZebj5AbDai_gYqO10eqFupGiKD-zKHMbp4jE4c/w:880/mb:500000/ar:1/aHR0cHM6Ly9jZG4t/aW1hZ2VzLTEubWVk/aXVtLmNvbS9tYXgv/MzIwLzAqRjFzU0tX/eWE4YXhmM0tJWS5w/bmc" class="article-body-image-wrapper"&gt;&lt;img src="https://community.ops.io/images/PxOXrZebj5AbDai_gYqO10eqFupGiKD-zKHMbp4jE4c/w:880/mb:500000/ar:1/aHR0cHM6Ly9jZG4t/aW1hZ2VzLTEubWVk/aXVtLmNvbS9tYXgv/MzIwLzAqRjFzU0tX/eWE4YXhmM0tJWS5w/bmc" alt="ZI Swiss army knife" width="320" height="320"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;a href="https://github.com/z-shell/zi"&gt;❮ ZI ❯&lt;/a&gt; 🧙‍‍♀️ A Swiss Army Knife for Zsh.
&lt;/h3&gt;

&lt;p&gt;Designed to glue everything together. 🔗&lt;/p&gt;

&lt;p&gt;&lt;a href="https://z.digitalclouds.dev"&gt;https://z.digitalclouds.dev&lt;/a&gt; | &lt;a href="https://github.com/z-shell/"&gt;GitHub&lt;/a&gt; | &lt;a href="https://github.com/orgs/z-shell/discussions/"&gt;Discussions&lt;/a&gt; | &lt;a href="https://crowdin.digitalclouds.dev"&gt;Localize&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;✴️ ZI 🧙‍‍♀️ supports &lt;code&gt;loading a plugin or snippet with a NICK-NAME&lt;/code&gt;. Set the nickname through the new &lt;code&gt;id-as''&lt;/code&gt; ice-mod.&lt;/p&gt;

&lt;p&gt;For example, one could try to load &lt;code&gt;docker/compose&lt;/code&gt; from GitHub &lt;strong&gt;binary releases&lt;/strong&gt; :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;zi ice as"program" from"gh-r" mv"docker-compose* -&amp;gt; docker-compose"
zi light "docker/compose"

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;✴️ This registers plugin under &lt;strong&gt;ID&lt;/strong&gt; &lt;code&gt;docker/compose&lt;/code&gt;. Now the user could want to load a &lt;strong&gt;completion&lt;/strong&gt; from GitHub repository (not the binary release catalog) also called &lt;code&gt;docker/compose&lt;/code&gt;. The two IDs, both being &lt;strong&gt;docker/compose&lt;/strong&gt; , will collide. The user can however resolve the conflict via &lt;code&gt;id-as''&lt;/code&gt; ice-mod by loading the completion under a &lt;strong&gt;nick-name&lt;/strong&gt; &lt;code&gt;dc-completion&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;zi ice as"completion" id-as"dc-completion"
zi load docker/compose

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;✴️ The completion is now seen under ID &lt;code&gt;dc-completion&lt;/code&gt;. Issuing &lt;code&gt;zi report dc-completion&lt;/code&gt; works, so as other ZI commands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; ▲ ~ zi report dc-completion
Plugin report for dc-completion
-------------------------------

Completions:
_docker-compose [enabled]

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;✴️ This can be also used to nickname snippets.&lt;/p&gt;

&lt;p&gt;For example, you can use this to create handlers in place of long urls:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;zi ice as"program" id-as"git-unique"
zi snippet https://github.com/Osse/git-scripts/blob/master/git-unique

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;zi delete git-unique&lt;/code&gt; will work, &lt;code&gt;zi times&lt;/code&gt; will show &lt;code&gt;git-unique&lt;/code&gt; instead of the URL, etc.&lt;/p&gt;

</description>
      <category>zi</category>
      <category>shell</category>
      <category>zsh</category>
      <category>devops</category>
    </item>
  </channel>
</rss>
