Permalink
Browse files

Don't use extglob in bash/docker-machine.bash

extglob is not needed here - the only call is:
_docker_machine_map_key_of_current_option '--filter'

So $glob is always '--filter', so there isn't every a pattern-list to match.

According to my testing completion for docker-machine
ls --filter completion works for both driver and state

Fixes #4126
Introduced in fd9a0a6

Signed-off-by: Ben Woosley <ben.woosley@gmail.com>
  • Loading branch information...
Empact committed Jun 16, 2017
1 parent c604d46 commit d983b844e9a621b6c29dfa168c39f0936ffa08c2
Showing with 2 additions and 2 deletions.
  1. +2 −2 contrib/completion/bash/docker-machine.bash
@@ -62,7 +62,7 @@ _docker_machine_value_of_option() {
}
# Returns `key` if we are currently completing the value of a map option
# (`key=value`) which matches the extglob passed in as an argument.
# (`key=value`) which matches the glob passed in as an argument.
# This function is needed for key-specific argument completions.
_docker_machine_map_key_of_current_option() {
local glob="$1"
@@ -83,7 +83,7 @@ _docker_machine_map_key_of_current_option() {
[ "${words[$glob_pos]}" = "=" ] && ((glob_pos--)) # --option=key=value syntax
[[ ${words[$glob_pos]} == @($glob) ]] && echo "$key"
[[ ${words[$glob_pos]} == $glob ]] && echo "$key"
}
# --- completion functions ---------------------------------------------------

0 comments on commit d983b84

Please sign in to comment.