diff --git a/command/autocomplete.go b/command/autocomplete.go new file mode 100644 index 0000000000..15099fa526 --- /dev/null +++ b/command/autocomplete.go @@ -0,0 +1,17 @@ +package command + +import ( + "github.com/posener/complete" +) + +// This file contains some re-usable predictors for auto-complete. The +// command-specific autocomplete configurations live within each command's +// own source file, as AutocompleteArgs and AutocompleteFlags methods on each +// Command implementation. + +// For completing the value of boolean flags like -foo false +var completePredictBoolean = complete.PredictSet("true", "false") + +// We don't currently have a real predictor for module sources, but +// we'll probably add one later. +var completePredictModuleSource = complete.PredictAnything