File tree Expand file tree Collapse file tree 1 file changed +3
-43
lines changed
staging/src/k8s.io/kubectl/pkg/cmd/completion Expand file tree Collapse file tree 1 file changed +3
-43
lines changed Original file line number Diff line number Diff line change @@ -223,49 +223,9 @@ __kubectl_get_comp_words_by_ref() {
223
223
}
224
224
225
225
__kubectl_filedir() {
226
- local RET OLD_IFS w qw
227
-
228
- __kubectl_debug "_filedir $@ cur=$cur"
229
- if [[ "$1" = \~* ]]; then
230
- # somehow does not work. Maybe, zsh does not call this at all
231
- eval echo "$1"
232
- return 0
233
- fi
234
-
235
- OLD_IFS="$IFS"
236
- IFS=$'\n'
237
- if [ "$1" = "-d" ]; then
238
- shift
239
- RET=( $(compgen -d) )
240
- else
241
- RET=( $(compgen -f) )
242
- fi
243
- IFS="$OLD_IFS"
244
-
245
- IFS="," __kubectl_debug "RET=${RET[@]} len=${#RET[@]}"
246
-
247
- for w in ${RET[@]}; do
248
- if [[ ! "${w}" = "${cur}"* ]]; then
249
- continue
250
- fi
251
- if eval "[[ \"\${w}\" = *.$1 || -d \"\${w}\" ]]"; then
252
- qw="$(__kubectl_quote "${w}")"
253
- if [ -d "${w}" ]; then
254
- COMPREPLY+=("${qw}/")
255
- else
256
- COMPREPLY+=("${qw}")
257
- fi
258
- fi
259
- done
260
- }
261
-
262
- __kubectl_quote() {
263
- if [[ $1 == \'* || $1 == \"* ]]; then
264
- # Leave out first character
265
- printf %q "${1:1}"
266
- else
267
- printf %q "$1"
268
- fi
226
+ # Don't need to do anything here.
227
+ # Otherwise we will get trailing space without "compopt -o nospace"
228
+ true
269
229
}
270
230
271
231
autoload -U +X bashcompinit && bashcompinit
You can’t perform that action at this time.
0 commit comments