2018-03-31 17:51:22 +08:00
|
|
|
# compgen
|
|
|
|
|
2021-08-15 19:59:09 +02:00
|
|
|
> A built-in command for auto-completion in Bash, which is called on pressing TAB key twice.
|
2021-08-23 22:33:24 +03:00
|
|
|
> More information: <https://www.cyberciti.biz/open-source/command-line-hacks/compgen-linux-command/>.
|
2018-03-31 17:51:22 +08:00
|
|
|
|
|
|
|
- List all commands that you could run:
|
|
|
|
|
|
|
|
`compgen -c`
|
|
|
|
|
|
|
|
- List all aliases:
|
|
|
|
|
|
|
|
`compgen -a`
|
|
|
|
|
|
|
|
- List all functions that you could run:
|
|
|
|
|
|
|
|
`compgen -A function`
|
|
|
|
|
2021-08-15 19:59:09 +02:00
|
|
|
- Show shell reserved keywords:
|
2018-03-31 17:51:22 +08:00
|
|
|
|
|
|
|
`compgen -k`
|
|
|
|
|
|
|
|
- See all available commands/aliases starting with 'ls':
|
|
|
|
|
|
|
|
`compgen -ac {{ls}}`
|