help 組み込みコマンドに関する情報を表示します。ヘルプのソースは何ですか?組み込みコマンドのデータベースを維持していますか、それとも各組み込みコマンドのいくつかのファイルを読み取りますか(各ユーティリティのマンページと同様)。
時々私はその情報がそれを拡大しているように見えるのを見つける --help
$ cd --help
bash: cd: --: invalid option
cd: usage: cd [-L|[-P [-e]]] [dir]
$ help cd
cd: cd [-L|[-P [-e]]] [dir]
Change the shell working directory.
Change the current directory to DIR. The default DIR is the value of the
HOME shell variable.
The variable CDPATH defines the search path for the directory containing
DIR. Alternative directory names in CDPATH are separated by a colon (:).
A null directory name is the same as the current directory. If DIR begins
with a slash (/), then CDPATH is not used.
If the directory is not found, and the shell option `cdable_vars' is set,
the word is assumed to be a variable name. If that variable has a value,
its value is used for DIR.
Options:
-L force symbolic links to be followed
-P use the physical directory structure without following symbolic
links
-e if the -P option is supplied, and the current working directory
cannot be determined successfully, exit with a non-zero status
The default is to follow symbolic links, as if `-L' were specified.
Exit Status:
Returns 0 if the directory is changed, and if $PWD is set successfully when
-P is used; non-zero otherwise.
help実行可能ファイルのヘルプ部分を抽出すると思いましたが、Pythonスクリプトpdf-merge.pyの場合は、
$ help ./pdf-merge.py
bash: help: no help topics match `./pdf-merge.py'. Try `help help' or `man -k ./pdf-merge.py' or `info ./pdf-merge.py'.
$ ./pdf-merge.py --help
usage: pdf-merge.py [-h] [-v] [--ask] [--output OUTPUT] [--title TITLE]
[--author AUTHOR] [--keyword KEYWORD] [--pdftk PDFTK]
[--gs GS] [--pdfmarks PDFMARKS] [--unicode]
PDF [PDF ...]
Merge PDFs preserving bookmarks. Thanks to Larry Cai for suggesting that
Unicode be supported and for discussion about the `--pdfmarks` option.
positional arguments:
PDF an input PDF to merge
optional arguments:
-h, --help show this help message and exit
-v, --version show program's version number and exit
--ask pause for manual pdfmark tweaking
--output OUTPUT name of the output PDF
--title TITLE title of output PDF
--author AUTHOR author of output PDF
--keyword KEYWORD keywords for the output PDF
--pdftk PDFTK path to the pdftk executable
--gs GS path to the gs (Ghostscript) executable
--pdfmarks PDFMARKS path to pdfmarks file. If not given, a temporary file
is used. If given and the file is missing, execution
will stop after the file is created (before the
Ghostscript run). If given and the file exists, no
attempt will be make to use pdftk to generate the mark
file (I assume your input file is what you want).
--unicode instead of merging PDFs, convert PDF-formatted unicode
strings. For example `--unicode '<FEFF03B103B203B3>'
\u03b1\u03b2\u03b3`
manコマンドと、それをサポートするシステムのコマンドも参照してくださいinfo。
cdはありません--help。表示されているのは、無効なオプションフラグを使用しようとしたときに表示される基本的な使用方法のメッセージです。