From 4aa6a324bedffc4c586ef6295ce151c95dc301dd Mon Sep 17 00:00:00 2001 From: Chuning Song Date: Sat, 31 Mar 2018 17:51:22 +0800 Subject: [PATCH] compgen: add page (#2050) --- pages/linux/compgen.md | 23 +++++++++++++++++++++++ pages/osx/compgen.md | 23 +++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 pages/linux/compgen.md create mode 100644 pages/osx/compgen.md diff --git a/pages/linux/compgen.md b/pages/linux/compgen.md new file mode 100644 index 000000000..15e350519 --- /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 000000000..15e350519 --- /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}}`