General availability: https://lettucemeet.com/l/e49bd
Parent issues
Ed's work schedule: 9am Central US to 5pm Central US
Ed's extended schedule: 7pm-9pm (on a when available basis)
Starting point: https://github.com/clap-rs/clap/issues/3920
Review how other custom completers design their dynamic completion parts and design a good dynamic completion: https://github.com/clap-rs/clap/discussions/5512
Confirm the features of the existing completion scripts for Cargo
commands. These need to be considered when designing the dynamic completion for clap_complete
.
Q: For value completion in Cargo commands, many require executing some functions to obtain the possible values list. We might need to implement the possible_values
method of the TypedValueParser
trait for Fn(&str) -> Result<T, E> + Clone + Send + Sync + 'static
to support user-defined closures or functions for obtaining possible values.
--option value
Three branches
=
?unstable-ext
PR
trait CustomCompleter {
fn completions(&self) -> Vec<CompletionCandidate>;
}
impl<F> CustomCompleter for F
where F: Fn() -> Vec<CompletionCandidate> {
fn completions(&self) -> Vec<CompletionCandidate> {
(self)()
}
}
cargo <cmd>
cargo <cmd> <args>
is separate and needs https://github.com/clap-rs/clap/issues/5653cargo <cmd> <args>
switch to env variable-driven completions
test plan
completest
for autoamted testsInitial cargo PR
uses env variables
only works on nightly
doesn't use argvaluecompleter yet
unstable.md
documentation
Open question: unstable feature of clap
Tracking issue tasks
CARGO_COMPLETE
CompleteEnv
CompleteEnv
, needs end to endor
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up
Syntax | Example | Reference | |
---|---|---|---|
# Header | Header | 基本排版 | |
- Unordered List |
|
||
1. Ordered List |
|
||
- [ ] Todo List |
|
||
> Blockquote | Blockquote |
||
**Bold font** | Bold font | ||
*Italics font* | Italics font | ||
~~Strikethrough~~ | |||
19^th^ | 19th | ||
H~2~O | H2O | ||
++Inserted text++ | Inserted text | ||
==Marked text== | Marked text | ||
[link text](https:// "title") | Link | ||
 | Image | ||
`Code` | Code |
在筆記中貼入程式碼 | |
```javascript var i = 0; ``` |
|
||
:smile: | ![]() |
Emoji list | |
{%youtube youtube_id %} | Externals | ||
$L^aT_eX$ | LaTeX | ||
:::info This is a alert area. ::: |
This is a alert area. |
On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?
Please give us some advice and help us improve HackMD.
Syncing