-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prefix bash functions with root command name (#643)
* Prefix bash functions with root command name Prior to this commit the autocomplete bash functions were being prefixed with the root command name, but references to those functions from subcommands were having the subcommands prefixed instead - causing the function lookups to fail and error out. For example (as observed in kubernetes/kubernetes#60517): kubectl create -f [Tab] failed with the following message: kubectl create -f __create_handle_filename_extension_flag: command not found in this case the function being invoked should be __kubectl_handle_filename_extension_flag Signed-off-by: John McCabe <john@johnmccabe.net> * Test filename extension and subdirs_in_dir for subcommands This commit adds two regex based tests to ensure that the handle filename extension and handle subdirs in dir functions are prefixed by the root command when present in subcommands. Previously they had been prefixed incorrectly with the subcommand name. Signed-off-by: John McCabe <john@johnmccabe.net>
- Loading branch information
1 parent
a1e4933
commit 6644d46
Showing
2 changed files
with
22 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters