mirror of
https://github.com/helm/helm.git
synced 2026-08-06 16:11:25 +00:00
With Cobra 1.0, it is now possible to control when file completion should or should not be done. For example: helm list <TAB> should not trigger file completion since 'helm list' does not accept any arguments. This commit disables file completion when appropriate and adds tests to verify that file completion is properly disabled. Signed-off-by: Marc Khouzam <marc.khouzam@montreal.ca>
24 lines
681 B
Go
24 lines
681 B
Go
/*
|
|
Copyright The Helm Authors.
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
*/
|
|
|
|
package main
|
|
|
|
import "testing"
|
|
|
|
func TestSearchFileCompletion(t *testing.T) {
|
|
checkFileCompletion(t, "search", false)
|
|
}
|