zsh組み込みコマンドのヘルプメッセージを取得するには?

zsh組み込みコマンドのヘルプメッセージを取得するには?

bash組み込みコマンドの簡単な使用法メッセージを取得するには、help <builtin>コマンドプロンプトで使用できます。

$ help export
export: export [-fn] [name[=value] ...] or export -p
    Set export attribute for shell variables.

    Marks each NAME for automatic export to the environment of subsequently
    executed commands.  If VALUE is supplied, assign VALUE before exporting.

    Options:
      -f        refer to shell functions
      -n        remove the export property from each NAME
      -p        display a list of all exported variables and functions

    An argument of `--' disables further option processing.

    Exit Status:
    Returns success unless an invalid option is given or NAME is invalid.

zshでどうすればいいですか?頑張った

% export --help
zsh: bad option: -e

そして

% help export
zsh: command not found: help

また、「ヘルプ」という言葉もどこにもありませんman zshbuiltins

ベストアンサー1

このリンクを通して@don_crisstiに感謝します。アーチウィキ文書
何らかの理由でArch Wikiのコードから呼び出すと、このエラーが発生します。

/home/velour/.zshrc:unalias:368: 対応するハッシュテーブル要素がありません: run-help

zsh --version=> zsh 5.1.1 (x86_64-ubuntu-linux-gnu)

だから私はそれを動作させるために次のブロックを追加してから~/.zshrcaliasコマンドをコメントアウトしました。

autoload -Uz run-help
autoload -Uz run-help-git
autoload -Uz run-help-svn
autoload -Uz run-help-svk
#unalias run-help
#alias help=run-help

そして簡単に電話してください

run-help <builtin>

だから今理解しています。

% run-help export

export [ name[=value] ... ]
       The specified names are marked for automatic export to the envi-
       ronment  of subsequently executed commands.  Equivalent to type-
       set -gx.  If a parameter specified does not already exist, it is
       created in the global scope.

おすすめ記事