compgen (built-in Bash command)

Content

 

Data

License: GNU GPLv3 +
Version number: GNU Bash 5
Developer / owner: Free Software Foundation Inc.

Short description:

The compgen built-in Bash command manual page and help. The compgen command displays possible command line additions depending on the switches specified.

 

 

Man page output

man bash
[...]
       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.  When using the -F  or  -C  options,  the
              various shell variables set by the programmable completion facilities, while avail-
              able, will not have useful values.

              The matches will be generated in the same way as  if  the  programmable  completion
              code  had  generated  them  directly  from a completion specification with the same
              flags.  If word is specified, only those completions matching  word  will  be  dis-
              played.

              The  return  value is true unless an invalid option is supplied, or no matches were
              generated.
[...]

 

 

Help output

compgen --help
compgen: compgen [-abcdefgjksuv] [-o beállítás] [-A művelet] [-G globminta] [-W szólista]  [-F függvény] [-C parancs] [-X szűrőminta] [-P prefixum] [-S szuffixum] [szó]
    Lehetséges kiegészítések megjelenítése a kapcsolóktól függően.

    Függvényben való használatra szolgál a lehetséges kiegészítések generálása
    céljából. Ha az elhagyható SZÓ argumentum is meg van adva, a SZÓRA
    elölről illeszkedő találatok jelennek csak meg.

    Kilépési kód:
    Sikerrel lép ki, kivéve érvénytelen kapcsoló vagy hiba esetén.

 

Related Content