からhelp compgen
:
$ help compgen
compgen: compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]
Display possible completions depending on the options.
Intended to be used from within a shell function generating possible
completions. If the optional WORD argument is supplied, matches against
WORD are generated.
Exit Status:
Returns success unless an invalid option is supplied or an error occurs.
オプションは何を[-abcdefgjksuv]
表していますか?
つまり、すべてのオプションの使い方を知りたいのです。
ベストアンサー1
コマンドオプションはおよびを除いてとcompgen
同じです。マニュアルページから:complete
-p
-r
compgen
compgen
compgen [option] [word]
Generate possible completion matches for word according to the options, which
may be any option accepted by the complete builtin with the exception of -p
and -r, and write the matches to the standard output
オプションの場合[abcdefgjksuv]
:
-a
エイリアスを表す名前-b
シェル組み込み関数の名前を示します。-c
すべてのコマンドの名前を示します。-d
ディレクトリ名を示します。-e
エクスポートされたシェル変数の名前を示します。-f
ファイル名を示します。-g
グループの名前を示します。-j
役職を表します。-k
シェル予約語の名前を示します。-s
サービス名を示します。-u
ユーザー名を表す名前-v
シェル変数の名前を表します。
完全なマニュアルページを見ることができますここ。