Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cli: Add 'dup' alias to 'duplicate' command #3581

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

prestonvanloon
Copy link
Contributor

Checklist

If applicable:

  • I have updated CHANGELOG.md
  • I have updated the documentation (README.md, docs/, demos/)
  • I have updated the config schema (cli/src/config-schema.json)
  • I have added tests to cover my changes

I found myself using the duplicate command often when splitting massive branches into smaller PRs. This alias could save me valuable milliseconds in the future 😄

@martinvonz
Copy link
Member

I'm torn. On one hand, it's easy to for users who want this alias to add it for themselves, and I would prefer that you and others do that to start with. Then we can add this alias if we hear that it's very common for people to have such an alias. On the other, it seems unlikely that dup will conflict with a future command, so it seems pretty harmless.

By the way, there's also tab completion scripts you can get from jj util completion. I use jj describe probably 100x as frequently as jj duplicate and I rely on tab completion to not have to type the whole name.

@prestonvanloon
Copy link
Contributor Author

@martinvonz ah, yes. I didn't realize that aliases could be added to .jjconfig.toml.

I agree with your points. I don't feel very strongly about this change, however I do think it's aligned with other built in aliases. Perhaps we let this PR sit for a bit and see if anyone 👍 's

@PhilipMetzger
Copy link
Contributor

Related to the discussion in #3218/#3242 and this #3242 (review) I don't really consider it worth it to make dup a builtin alias. But shipping it in the config LGTM.

@necauqua
Copy link
Contributor

I use jj describe

There is jj desc currently - so I'd thing we can accept shortening aliases, those that are unambiguous enough to not interfere in the future at least, although I agree it should be an alias in the default config, not hardcoded in clap

@martinvonz
Copy link
Member

I use jj describe

There is jj desc currently - so I'd thing we can accept shortening aliases, those that are unambiguous enough to not interfere in the future at least, although I agree it should be an alias in the default config, not hardcoded in clap

Oh, you're right. I didn't even notice that because I always rely on tab completion. Same with jj ab<TAB>.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants