valgrind: Parse option arguments that contain dashes.

Fixes parsing lines like "--smc-check=none|stack|all|all-non-file".
This commit is contained in:
Igor Murzov 2011-11-20 20:52:29 +03:00
parent d26ede488c
commit 811666369e

View File

@ -81,7 +81,7 @@ _valgrind()
;; ;;
# "yes", "yes|no", etc (but not "string", "STR", # "yes", "yes|no", etc (but not "string", "STR",
# "hint1,hint2,...") # "hint1,hint2,...")
yes|+([a-z0-9])\|+([a-z0-9\|])) yes|+([-a-z0-9])\|+([-a-z0-9\|]))
COMPREPLY=( $( IFS='|' compgen -W '$value' -- "$cur" ) ) COMPREPLY=( $( IFS='|' compgen -W '$value' -- "$cur" ) )
return return
;; ;;