0

oh-my-zsh git-flow プラグインを使用しようとすると、次のエラーが発生します。

➜  ~/www/ git:(develop) git flow feature feature
flags:FATAL zsh shwordsplit option is required for proper zsh operation

これはプラグインの問題ですか?または構成の問題?

編集:使用setopt shwordsplitしても役に立たない

➜  ~/www/ git:(develop) ✗ setopt shwordsplit 
➜  ~/www/ git:(develop) ✗ git flow feature  
flags:FATAL zsh shwordsplit option is required for proper zsh operation

編集2:使用set -x

(k3)➜  ~  git flow feature
+_per-directory-history-addhistory:1> print -sr -- git flow feature
+_per-directory-history-addhistory:2> fc -p /home/gaurav/.directory_history/home/gaurav/history
+_per-directory-history-addhistory:1> print -sr -- git flow feature
+_per-directory-history-addhistory:2> fc -p /home/gaurav/.directory_history/home/gaurav/history
+_per-directory-history-addhistory:1> print -sr -- git flow feature
+_per-directory-history-addhistory:2> fc -p /home/gaurav/.directory_history/home/gaurav/history
+_per-directory-history-addhistory:1> print -sr -- git flow feature
+_per-directory-history-addhistory:2> fc -p /home/gaurav/.directory_history/home/gaurav/history
+_per-directory-history-addhistory:1> print -sr -- git flow feature
+_per-directory-history-addhistory:2> fc -p /home/gaurav/.directory_history/home/gaurav/history
+omz_termsupport_preexec:1> emulate -L zsh
+omz_termsupport_preexec:2> setopt extended_glob
+omz_termsupport_preexec:3> local 'CMD='
+omz_termsupport_preexec:4> title '' '%100>...>git flow feature%<<'
+title:1> [[ '' == true ]]
+title:1> [[ '' == *term* ]]
+title:4> [[ xterm == screen* ]]
+title:6> [[ xterm == xterm* ]]
+title:7> print -Pn '\e]2;%100\>...\>git\ flow\ feature%\<\<\a'
+title:8> print -Pn '\e]1;\a'
+/usr/bin/zsh:1310> git flow feature
flags:FATAL zsh shwordsplit option is required for proper zsh operation
+omz_termsupport_precmd:1> title '%15<..<%~%<<' %n@%m: '%~'                                                                                                                                                                           
+title:1> [[ '' == true ]]
+title:1> [[ '' == *term* ]]
+title:4> [[ xterm == screen* ]]
+title:6> [[ xterm == xterm* ]]
+title:7> print -Pn '\e]2;%n@%m:\a'
+title:8> print -Pn '\e]1;%15\<..\<%~%\<\<\a'
+/usr/bin/zsh:1311> git_prompt_info
+git_prompt_info:1> ref=+git_prompt_info:1> git symbolic-ref HEAD
+git_prompt_info:1> ref='' 
+git_prompt_info:1> return

EDIT 2:セットアップに関する詳細情報

(k3)➜  K3 git:(feature/ebay_listings) ls -l /bin/sh
lrwxrwxrwx 1 root root 12 Oct  7 22:12 /bin/sh -> /usr/bin/zsh
(k3)➜  K3 git:(feature/ebay_listings) ls -l /usr/bin/zsh 
lrwxrwxrwx 1 root root 28 Oct  2 13:49 /usr/bin/zsh -> /etc/alternatives/zsh-usrbin
(k3)➜  K3 git:(feature/ebay_listings) ls -l /bin/zsh
lrwxrwxrwx 1 root root 21 Oct  2 13:49 /bin/zsh -> /etc/alternatives/zsh
(k3)➜  K3 git:(feature/ebay_listings) ls -l /etc/alternatives/zsh-usrbin 
lrwxrwxrwx 1 root root 9 Oct  2 13:49 /etc/alternatives/zsh-usrbin -> /bin/zsh4
(k3)➜  K3 git:(feature/ebay_listings) ls -l /bin/zsh4 
-rwxr-xr-x 1 root root 688656 Mar 30  2012 /bin/zsh4
(k3)➜  K3 git:(feature/ebay_listings) ls -l /etc/alternatives/zsh
lrwxrwxrwx 1 root root 9 Oct  2 13:49 /etc/alternatives/zsh -> /bin/zsh4
(k3)➜  K3 git:(feature/ebay_listings) /bin/sh -c 'echo $0 B$BASH_VERSION Z$ZSH_VERSION'
/bin/sh B Z4.3.17
4

1 に答える 1

1

エラーメッセージで完全に説明されている構成の問題です。

適切な zsh 操作には zsh shwordsplit オプションが必要です

. setopt shwordsplitzshrcに追加する必要があります。このオプションが不便であることを git-flow の作成者に納得させた方がよいでしょう: command $varvar がスカラーである場合に設定すると、任意の数の引数でコマンドが呼び出される可能性があります (文字列に含まれるスペース/タブ/改行の量によって異なります)。command "$var"代わりに入力する必要があります。なし: 1 つあり、に等しい$var

于 2012-10-11T16:50:23.333 に答える