Fix predictor

This commit is contained in:
Alex Dadgar
2017-07-19 11:51:01 -07:00
parent 3127ce320c
commit 8a371e0bd4

View File

@@ -410,11 +410,17 @@ func (c *Command) checkpointResults(results *checkpoint.CheckResponse, err error
}
func (c *Command) AutocompleteFlags() complete.Flags {
return nil
configFilePredictor := complete.PredictOr(
complete.PredictFiles("*.json"),
complete.PredictFiles("*.hcl"))
return map[string]complete.Predictor{
"-config": configFilePredictor,
}
}
func (c *Command) AutocompleteArgs() complete.Predictor {
return complete.PredictOr(complete.PredictFiles("*.json"), complete.PredictFiles("*.hcl"))
return nil
}
func (c *Command) Run(args []string) int {