浏览代码

fix(cli): get branch and tags from OMZ folder in `omz changelog` completion

Marc Cornellà 2 年之前
父节点
当前提交
5f99eb5afd
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      lib/cli.zsh

+ 1 - 1
lib/cli.zsh

@@ -35,7 +35,7 @@ function _omz {
   elif (( CURRENT == 3 )); then
   elif (( CURRENT == 3 )); then
     case "$words[2]" in
     case "$words[2]" in
       changelog) local -a refs
       changelog) local -a refs
-        refs=("${(@f)$(command git for-each-ref --format="%(refname:short):%(subject)" refs/heads refs/tags)}")
+        refs=("${(@f)$(command git -C "$ZSH" for-each-ref --format="%(refname:short):%(subject)" refs/heads refs/tags)}")
         _describe 'command' refs ;;
         _describe 'command' refs ;;
       plugin) subcmds=(
       plugin) subcmds=(
         'disable:Disable plugin(s)'
         'disable:Disable plugin(s)'