ZLE(zsh) の単語定義

ZLE(zsh) の単語定義

zshで次の2つを見つけました。

スニペット 1:

autoload select-word-style
select-word-style shell

スニペット 2:

setopt shwordsplit

私の質問は、それらの違いは何ですか? (つまり、彼らは何をしますか?)

そしてキーワード別のインデックス付けもありますか?zsh ドキュメント? (たとえば、これらの2つのフラグメントに関する文書情報は簡単に見つかりません。)

そのようなインデックスが存在しない場合は、簡単なGoogle検索やこのサイトに連絡することに加えて、またはshwordsplit同じキーワードのドキュメントを見つける方法について提案がある人はいますかselect-word-style

ベストアンサー1

最良の方法は zshall(1) です。これには、これらの機能とすべてのzsh機能に関するドキュメントが含まれており、お気に入りのポケットベルで簡単に検索できます(少ない方が多い)。

 $ man zshall

          zsh -x -o shwordsplit scr

   runs  the  script  scr,  setting  the XTRACE option by the
   corresponding letter `-x' and the SH_WORD_SPLIT option by name.

[… ]

   SH_WORD_SPLIT (-y) <K> <S>
     Causes field splitting to be performed on unquoted parameter
     expansions.  Note that this option has nothing to do with word
     splitting.  (See the section `Parameter Expansion'.)      

そして

     The simplest way of configuring the functions is to use
     select-word-style, which can either be called as a normal
     function with the appropriate argument, or invoked as a
     user-defined widget that will prompt for the first character of
     the word style to be used.  The first time it is invoked, the
     eight -match functions will automatically replace the builtin
     versions, so they do not need to be loaded explicitly.

おすすめ記事