fix kubectl_filedir completion

pull/6/head
juanvallejo 2018-03-13 16:21:30 -04:00
parent f850b42474
commit 3dc952e761
No known key found for this signature in database
GPG Key ID: 7D2C958002D6448D
3 changed files with 5 additions and 5 deletions

View File

@ -210,7 +210,7 @@ __kubeadm_get_comp_words_by_ref() {
__kubeadm_filedir() {
local RET OLD_IFS w qw
__debug "_filedir $@ cur=$cur"
__kubectl_debug "_filedir $@ cur=$cur"
if [[ "$1" = \~* ]]; then
# somehow does not work. Maybe, zsh does not call this at all
eval echo "$1"
@ -227,7 +227,7 @@ __kubeadm_filedir() {
fi
IFS="$OLD_IFS"
IFS="," __debug "RET=${RET[@]} len=${#RET[@]}"
IFS="," __kubectl_debug "RET=${RET[@]} len=${#RET[@]}"
for w in ${RET[@]}; do
if [[ ! "${w}" = "${cur}"* ]]; then

View File

@ -141,7 +141,7 @@ __kubectl_get_containers()
{
local template
template="{{ range .spec.containers }}{{ .name }} {{ end }}"
__debug "${FUNCNAME} nouns are ${nouns[*]}"
__kubectl_debug "${FUNCNAME} nouns are ${nouns[*]}"
local len="${#nouns[@]}"
if [[ ${len} -ne 1 ]]; then

View File

@ -223,7 +223,7 @@ __kubectl_get_comp_words_by_ref() {
__kubectl_filedir() {
local RET OLD_IFS w qw
__debug "_filedir $@ cur=$cur"
__kubectl_debug "_filedir $@ cur=$cur"
if [[ "$1" = \~* ]]; then
# somehow does not work. Maybe, zsh does not call this at all
eval echo "$1"
@ -240,7 +240,7 @@ __kubectl_filedir() {
fi
IFS="$OLD_IFS"
IFS="," __debug "RET=${RET[@]} len=${#RET[@]}"
IFS="," __kubectl_debug "RET=${RET[@]} len=${#RET[@]}"
for w in ${RET[@]}; do
if [[ ! "${w}" = "${cur}"* ]]; then