You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Sep 28, 2021. It is now read-only.
Repository navigation
Commit 0cf4d88
Browse filesBrowse the repository at this point in the historyBrowse files
* Add bash completion for commands and flags
* Remove incorrectly checked-in yml
* Limit more flags with file extension requirements
* Cleanup
* More cleanup
* Improved suggestions and flag handling
Completion now supports both the --param value and the --param=value formats when forwarding flags to corectl lookup calls
Moved engine,app,ttl,headers,config flags to top most command level to work better with the autocomplete feature
* Minor changes to documentation
* Minor changes to documentation
Copy file name to clipboardExpand all lines: LICENSE
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -19,3 +19,5 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
19
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
20
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
21
THE SOFTWARE.
22
+
23
+
cmd/utils.go is based on https://github.com/kubernetes/kubernetes/blob/e2c1f435516085ef17f222fb7f89cd3ba13aa944/pkg/kubectl/cmd/completion/completion.go, licensed under the Apache License, Version 2.0.
Copy file name to clipboardExpand all lines: README.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -73,6 +73,12 @@ Also check out the blog post about utilizing `corectl` and `catwalk` to build yo
73
73
74
74
Usage documentation can be found [here](./docs/corectl.md).
75
75
76
+
`corectl`provides auto completion of commands and flags for `bash` and `zsh`. To load completion in your shell add the following to your `~/.bashrc` or `~/.zshrc` file depending on shell.
rootCmd.PersistentFlags().StringVarP(&explicitConfigFile, "config", "c", "", "path/to/config.yml where parameters can be set instead of on the command line")
82
+
// Set annotation to run bash completion function for the config flag and only show .yaml or .yml files
command.PersistentFlags().StringVarP(&explicitConfigFile, "config", "c", "", "path/to/config.yml where parameters can be set instead of on the command line")
89
-
}
90
-
91
-
//since several commands are using the same flag, the viper binding has to be done in the commands prerun function, otherwise they overwrite.
91
+
rootCmd.PersistentFlags().StringP("engine", "e", "", "URL to the Qlik Associative Engine (default \"localhost:9076\")")
// Don't bind these to viper since paths are treated separately to support relative paths!
112
107
command.PersistentFlags().String("connections", "", "path/to/connections.yml that contains connections that are used in the reload. Note that when specifying connections in the config file they are specified inline, not as a file reference!")
108
+
// Set annotation to run bash completion function for the connections flag and only show .yml or .yaml files
// Don't bind these to viper since paths are treated separately to support relative paths!
140
143
command.PersistentFlags().String("script", "", "path/to/reload-script.qvs that contains a qlik reload script. If omitted the last specified reload script for the current app is reloaded")
144
+
// Set annotation to run bash completion function for the script flag and only show .qvs files
0 commit comments