From e149968eaf7aa3591c09e27b5bc84ea952b05912 Mon Sep 17 00:00:00 2001 From: Rajat Jindal Date: Wed, 21 Feb 2018 09:09:13 -0800 Subject: [PATCH] add documentation for bash alias --- bash_completions.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/bash_completions.md b/bash_completions.md index 44d777c1..691a04e1 100644 --- a/bash_completions.md +++ b/bash_completions.md @@ -204,3 +204,17 @@ __kubectl_get_namespaces() fi } ``` +# Using bash aliases for commands + +You can also configure the `bash aliases` for the commands and they will also support completions. + +```bash +alias aliasname=origcommand +complete -o default -F __start_origcommand aliasname + +# and now when you run `aliasname` completion will make +# suggestions as it did for `origcommand`. + +$) aliasname +completion firstcommand secondcommand +```