mirror of
https://github.com/clap-rs/clap
synced 2024-12-13 22:32:33 +00:00
imp(Completions): completions now continue completing even after first completion
Prior to this change, completions only allowed one completion per command, this change allows as many as required. The one downside to this change is the completion engine isn't smart enough to determine which options are no longer legal after certain options have been applied.
This commit is contained in:
parent
89cc2026ba
commit
18fc2e5b5a
1 changed files with 4 additions and 0 deletions
|
@ -78,6 +78,8 @@ impl<'a, 'b> ComplGen<'a, 'b> {
|
|||
COMPREPLY=()
|
||||
;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W \"${{opts}}\" -- ${{cur}}) )
|
||||
return 0
|
||||
;;
|
||||
{subcmd_details}
|
||||
esac
|
||||
|
@ -133,6 +135,8 @@ complete -F _{name} {name}
|
|||
COMPREPLY=()
|
||||
;;
|
||||
esac
|
||||
COMPREPLY=( $(compgen -W \"${{opts}}\" -- ${{cur}}) )
|
||||
return 0
|
||||
;;",
|
||||
subcmd_dets,
|
||||
subcmd=sc.replace("-", "_"),
|
||||
|
|
Loading…
Reference in a new issue