2018-03-31 10:51:22 +01:00
|
|
|
# compgen
|
|
|
|
|
|
|
|
> A built-in command for auto-completion in bash, which is called on pressing TAB key twice.
|
2021-07-09 15:45:55 +01:00
|
|
|
> More information: <https://www.gnu.org/software/bash/manual/bash.html#index-compgen>.
|
2018-03-31 10:51:22 +01: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`
|
|
|
|
|
|
|
|
- Show shell reserved key words:
|
|
|
|
|
|
|
|
`compgen -k`
|
|
|
|
|
|
|
|
- See all available commands/aliases starting with 'ls':
|
|
|
|
|
|
|
|
`compgen -ac {{ls}}`
|