title: Manipulate zsh arrays with operator j
body: <p>The following code is taken from <a href="http://eseth.org/2010/git-in-zsh.html" rel="nofollow noreferrer">here</a>:</p>
  
  <pre><code>function +vi-git-st() {
      local ahead behind remote
      local -a gitstatus
  
      # Are we on a remote-tracking branch?
      remote=${$(git rev-parse --verify ${hook_com[branch]}@{upstream} \
          --symbolic-full-name 2&gt;/dev/null)/refs\/remotes\/}
  
      if [[ -n ${remote} ]] ; then
          # for git prior to 1.7
          # ahead=$(git rev-list origin/${hook_com[branch]}..HEAD | wc -l)
          ahead=$(git rev-list ${hook_com[branch]}@{upstream}..HEAD 2&gt;/dev/null | wc -l)
          (( $ahead )) &amp;&amp; gitstatus+=( "${c3}+${ahead}${c2}" )
  
          # for git prior to 1.7
          # behind=$(git rev-list HEAD..origin/${hook_com[branch]} | wc -l)
          behind=$(git rev-list HEAD..${hook_com[branch]}@{upstream} 2&gt;/dev/null | wc -l)
          (( $behind )) &amp;&amp; gitstatus+=( "${c4}-${behind}${c2}" )
  
          hook_com[branch]="${hook_com[branch]} [${remote} ${(j:/:)gitstatus}]"
      fi
  }
  </code></pre>
  
  <p>I do not understand the last line. Variable <code>gitstatus</code> is an array, so what is <code>${(j:/:)gitstatus}</code> supposed to do? I know that it outputs the string <code>first_array_element/second_array_element</code> but I did not manage to find any documentation about operator <code>j</code>. Is this some specific zsh feature, or is it standard shell programming construct?</p>