Revision 580ef58d autotools/build-bash-completion
b/autotools/build-bash-completion | ||
---|---|---|
208 | 208 |
if opt.takes_value(): |
209 | 209 |
# Ignore value |
210 | 210 |
for i in opt.all_names: |
211 |
ignore.append("%s=*" % utils.ShellQuote(i)) |
|
211 |
if i.startswith("--"): |
|
212 |
ignore.append("%s=*" % utils.ShellQuote(i)) |
|
212 | 213 |
skip_one.append(utils.ShellQuote(i)) |
213 | 214 |
else: |
214 | 215 |
ignore.extend([utils.ShellQuote(i) for i in opt.all_names]) |
... | ... | |
392 | 393 |
sw.Write("%s() {", funcname) |
393 | 394 |
sw.IncIndent() |
394 | 395 |
try: |
395 |
sw.Write('local cur="$2" prev="$3"') |
|
396 |
sw.Write("local i first_arg_idx choices compgenargs arg_idx") |
|
396 |
sw.Write("local " |
|
397 |
' cur="${COMP_WORDS[$COMP_CWORD]}"' |
|
398 |
' prev="${COMP_WORDS[COMP_CWORD-1]}"' |
|
399 |
' i first_arg_idx choices compgenargs arg_idx') |
|
400 |
|
|
401 |
# Useful for debugging: |
|
402 |
#sw.Write("echo cur=\"$cur\" prev=\"$prev\"") |
|
403 |
#sw.Write("set | grep ^COMP_") |
|
397 | 404 |
|
398 | 405 |
sw.Write("COMPREPLY=()") |
399 | 406 |
|
Also available in: Unified diff