diff --git a/pages/linux/compgen.md b/pages/linux/compgen.md new file mode 100644 index 0000000000..15e3505194 --- /dev/null +++ b/pages/linux/compgen.md @@ -0,0 +1,23 @@ +# compgen + +> A built-in command for auto-completion in bash, which is called on pressing TAB key twice. + +- 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}}` diff --git a/pages/osx/compgen.md b/pages/osx/compgen.md new file mode 100644 index 0000000000..15e3505194 --- /dev/null +++ b/pages/osx/compgen.md @@ -0,0 +1,23 @@ +# compgen + +> A built-in command for auto-completion in bash, which is called on pressing TAB key twice. + +- 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}}`