pulumi/cmd
Thomas Schersach cb9cb7da94 Reworked gen-bash-completion into a more generic completion command (#1967)
## Why ?

I'm using Zsh (and I'm not the only one 🤣). Pulumi having Zsh completions is great. I will also add completions to the Homebrew Formula when this is merged.

## Why not use Cobra `GenZshCompletion`

It's currently not good enough. Maybe it will be when spf13/cobra#646 is done.

## Implementation

I did the same thing `kubectl` does for Zsh completion. Meaning using the bash completion generated by Cobra and adapting it to a zsh format. The resulting zsh completion file is not perfect (compared to one's where you have a short command description in the output) but it's good enough I think. 

I also changed the file output to a stdout output. I think it's better than outputting to a file and it will make adding completions in Homebrew straightforward. I don't know if the previous `gen-bash-completion` is used in any Pulumi project so this may break things.
2018-09-24 06:25:16 -07:00
..
archive.go Add license headers 2018-05-22 15:02:47 -07:00
cancel.go Implement preview-then-update for local stacks 2018-09-05 07:33:18 -07:00
config.go Implement preview-then-update for local stacks 2018-09-05 07:33:18 -07:00
config_test.go Consider the key name as part of secret detection 2018-08-09 19:10:14 -07:00
destroy.go Implement preview-then-update for local stacks 2018-09-05 07:33:18 -07:00
errors.go Revert "Plumb LogRequest.IsStatus through the logging subsystem" 2018-08-31 15:56:53 -07:00
gen_completion.go Reworked gen-bash-completion into a more generic completion command (#1967) 2018-09-24 06:25:16 -07:00
gen_markdown.go Add license headers 2018-05-22 15:02:47 -07:00
login.go Refactor display logic out of pkg/backend/filestate 2018-09-05 07:33:18 -07:00
logout.go Rename backend packages 2018-09-05 07:32:42 -07:00
logs.go Implement preview-then-update for local stacks 2018-09-05 07:33:18 -07:00
logs_test.go Add license headers 2018-05-22 15:02:47 -07:00
new.go Stop using black/white colors directly when printing out console text. They can have issues with light/dark terminals. (#1951) 2018-09-19 01:40:03 -07:00
plugin.go Implement status sinks 2018-08-31 15:56:53 -07:00
plugin_install.go Refactor display logic out of pkg/backend/filestate 2018-09-05 07:33:18 -07:00
plugin_ls.go Add license headers 2018-05-22 15:02:47 -07:00
plugin_rm.go Refactor display logic out of pkg/backend/filestate 2018-09-05 07:33:18 -07:00
preview.go Implement preview-then-update for local stacks 2018-09-05 07:33:18 -07:00
pulumi.go Reworked gen-bash-completion into a more generic completion command (#1967) 2018-09-24 06:25:16 -07:00
refresh.go Implement preview-then-update for local stacks 2018-09-05 07:33:18 -07:00
stack.go Implement preview-then-update for local stacks 2018-09-05 07:33:18 -07:00
stack_export.go Refactor display logic out of pkg/backend/filestate 2018-09-05 07:33:18 -07:00
stack_graph.go Refactor display logic out of pkg/backend/filestate 2018-09-05 07:33:18 -07:00
stack_import.go Implement preview-then-update for local stacks 2018-09-05 07:33:18 -07:00
stack_init.go Refactor display logic out of pkg/backend/filestate 2018-09-05 07:33:18 -07:00
stack_ls.go Change backend.ListStacks to return a new StackSummary interface (#1931) 2018-09-13 20:54:42 -07:00
stack_output.go Refactor display logic out of pkg/backend/filestate 2018-09-05 07:33:18 -07:00
stack_output_test.go Add license headers 2018-05-22 15:02:47 -07:00
stack_rm.go Implement preview-then-update for local stacks 2018-09-05 07:33:18 -07:00
stack_select.go Implement preview-then-update for local stacks 2018-09-05 07:33:18 -07:00
up.go Consolidate some new and up functionality (#1884) 2018-09-06 12:45:56 -07:00
util.go Remember lazy stack selection (#1964) 2018-09-21 07:45:23 -07:00
version.go Add license headers 2018-05-22 15:02:47 -07:00
whoami.go Refactor display logic out of pkg/backend/filestate 2018-09-05 07:33:18 -07:00