mirror of
https://github.com/martinvonz/jj.git
synced 2025-02-06 03:22:59 +00:00
dynamic completion: add revision completion to hidden -r arguments
Before this commmit, `jj desc <tab>` resulted in revision completions, but the equivalent `jj desc -r <tab>` didn't.
This commit is contained in:
parent
a6f20cf42f
commit
cf69a36a62
3 changed files with 18 additions and 3 deletions
|
@ -47,7 +47,12 @@ pub(crate) struct AbandonArgs {
|
|||
add = ArgValueCandidates::new(complete::mutable_revisions)
|
||||
)]
|
||||
revisions_pos: Vec<RevisionArg>,
|
||||
#[arg(short = 'r', hide = true, value_name = "REVSETS")]
|
||||
#[arg(
|
||||
short = 'r',
|
||||
hide = true,
|
||||
value_name = "REVSETS",
|
||||
add = ArgValueCandidates::new(complete::mutable_revisions)
|
||||
)]
|
||||
revisions_opt: Vec<RevisionArg>,
|
||||
/// Do not print every abandoned commit on a separate line
|
||||
#[arg(long, short)]
|
||||
|
|
|
@ -49,7 +49,12 @@ pub(crate) struct DescribeArgs {
|
|||
add = ArgValueCandidates::new(complete::mutable_revisions)
|
||||
)]
|
||||
revisions_pos: Vec<RevisionArg>,
|
||||
#[arg(short = 'r', hide = true, value_name = "REVSETS")]
|
||||
#[arg(
|
||||
short = 'r',
|
||||
hide = true,
|
||||
value_name = "REVSETS",
|
||||
add = ArgValueCandidates::new(complete::mutable_revisions)
|
||||
)]
|
||||
revisions_opt: Vec<RevisionArg>,
|
||||
/// The change description to use (don't open editor)
|
||||
///
|
||||
|
|
|
@ -57,7 +57,12 @@ pub(crate) struct DuplicateArgs {
|
|||
add = ArgValueCandidates::new(complete::all_revisions)
|
||||
)]
|
||||
revisions_pos: Vec<RevisionArg>,
|
||||
#[arg(short = 'r', hide = true, value_name = "REVSETS")]
|
||||
#[arg(
|
||||
short = 'r',
|
||||
hide = true,
|
||||
value_name = "REVSETS",
|
||||
add = ArgValueCandidates::new(complete::all_revisions)
|
||||
)]
|
||||
revisions_opt: Vec<RevisionArg>,
|
||||
/// The revision(s) to duplicate onto (can be repeated to create a merge
|
||||
/// commit)
|
||||
|
|
Loading…
Reference in a new issue