Fix zsh completion (#1108)

4ec533b introduced a bug which causes the 'hidden' cli parameter
`__complete` to be ignored.

Add a check for this parameter, so that it can pass to `cobra`

Signed-off-by: Tom Whitwell <tom@whi.tw>
This commit is contained in:
whi-tw
2022-02-14 08:03:24 +11:00
committed by GitHub
parent a5f6a80cf6
commit 4b2b47af48
2 changed files with 10 additions and 1 deletions
+9
View File
@@ -0,0 +1,9 @@
#!/bin/bash
testCompletionRuns() {
result=$(./yq __complete "" 2>&1)
assertEquals 0 $?
assertContains "$result" "Completion ended with directive:"
}
source ./scripts/shunit2