Skip to content

Commit

Permalink
cli: make jj desc and jj st aliases visible again
Browse files Browse the repository at this point in the history
This backs out commit fd271d3 "cli: make `jj desc` and `jj st` aliases
hidden."

As we discussed in #4811, completion of
flags doesn't work for hidden aliases.
  • Loading branch information
yuja committed Dec 3, 2024
1 parent 21a6a24 commit 5db4f0b
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 11 deletions.
3 changes: 0 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
* Templates now support the `==` and `!=` logical operators for `Boolean`,
`Integer`, and `String` types.

* The `jj desc` and `jj st` aliases are now hidden to not interfere with shell
completion. They remain available.

* New command `jj absorb` that moves changes to stack of mutable revisions.

* New command `jj util exec` that can be used for arbitrary aliases.
Expand Down
4 changes: 2 additions & 2 deletions cli/src/commands/describe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ use crate::description_util::ParsedBulkEditMessage;
use crate::text_util::parse_author;
use crate::ui::Ui;

/// Update the change description or other metadata [aliases: desc]
/// Update the change description or other metadata
///
/// Starts an editor to let you edit the description of changes. The editor
/// will be $EDITOR, or `pico` if that's not defined (`Notepad` on Windows).
#[derive(clap::Args, Clone, Debug)]
#[command(alias = "desc")]
#[command(visible_aliases = &["desc"])]
pub(crate) struct DescribeArgs {
/// The revision(s) whose description to edit
#[arg(default_value = "@", add = ArgValueCandidates::new(complete::mutable_revisions))]
Expand Down
4 changes: 2 additions & 2 deletions cli/src/commands/status.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ use crate::diff_util::get_copy_records;
use crate::diff_util::DiffFormat;
use crate::ui::Ui;

/// Show high-level repo status [aliases: st]
/// Show high-level repo status
///
/// This includes:
///
/// * The working copy commit and its (first) parent, and a summary of the
/// changes between them
/// * Conflicted bookmarks (see https://martinvonz.github.io/jj/latest/bookmarks/)
#[derive(clap::Args, Clone, Debug)]
#[command(alias = "st")]
#[command(visible_alias = "st")]
pub(crate) struct StatusArgs {
/// Restrict the status display to these paths
#[arg(value_hint = clap::ValueHint::AnyPath)]
Expand Down
8 changes: 4 additions & 4 deletions cli/tests/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ To get started, see the tutorial at https://martinvonz.github.io/jj/latest/tutor
* `bookmark`Manage bookmarks [default alias: b]
* `commit`Update the description and create a new change on top
* `config`Manage config options
* `describe`Update the change description or other metadata [aliases: desc]
* `describe`Update the change description or other metadata
* `diff`Compare file contents between two revisions
* `diffedit`Touch up the content changes in a revision with a diff editor
* `duplicate`Create new changes with the same content as existing ones
Expand All @@ -154,7 +154,7 @@ To get started, see the tutorial at https://martinvonz.github.io/jj/latest/tutor
* `sparse`Manage which paths from the working-copy commit are present in the working copy
* `split`Split a revision in two
* `squash`Move changes from a revision into another revision
* `status`Show high-level repo status [aliases: st]
* `status`Show high-level repo status
* `tag`Manage tags
* `util`Infrequently used commands such as for generating shell completions
* `undo`Undo an operation (shortcut for `jj op undo`)
Expand Down Expand Up @@ -635,7 +635,7 @@ Update config file to unset the given option
## `jj describe`
Update the change description or other metadata [aliases: desc]
Update the change description or other metadata
Starts an editor to let you edit the description of changes. The editor will be $EDITOR, or `pico` if that's not defined (`Notepad` on Windows).
Expand Down Expand Up @@ -2107,7 +2107,7 @@ If a working-copy commit gets abandoned, it will be given a new, empty commit. T
## `jj status`
Show high-level repo status [aliases: st]
Show high-level repo status
This includes:
Expand Down

0 comments on commit 5db4f0b

Please sign in to comment.