Chris Hager
Programming, Technology & More

Useful Linux Command of the Day - compgen

I’ve just learned about a particularly nice Linux shell command: compgen

$ compgen -c … list all the commands you could run.
$ compgen -a … list all the aliases you could run.
$ compgen -b … list all the built-ins you could run.
$ compgen -k … list all the keywords you could run.
$ compgen -A function … list all the functions you could run.
$ compgen -A function -abck … list all the above in one go.

 



Share this post if you like it <3
swirl

Posted by Chris Hager in  ·  11 Dec 2010


swirl