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

jujutsu: Remove superfluous shell completion #5037

Merged
merged 1 commit into from
Feb 20, 2024
Merged

Conversation

jcf
Copy link
Contributor

@jcf jcf commented Feb 19, 2024

This issue has come up before, and the recommendation was to remove the shell completion logic from Home Manager. This pull request now does just that.

Description

$ for sh (--bash --fish --zsh); jj util completion "$sh" >/dev/null
Warning: `jj util completion --bash` will be removed in a future version, and this will be a hard error
Hint: Use `jj util completion bash` instead
Warning: `jj util completion --fish` will be removed in a future version, and this will be a hard error
Hint: Use `jj util completion fish` instead
Warning: `jj util completion --zsh` will be removed in a future version, and this will be a hard error
Hint: Use `jj util completion zsh` instead

Checklist

  • Change is backwards compatible.

  • Code formatted with ./format.

  • Code tested through nix-shell --pure tests -A run.all or nix develop --ignore-environment .#all using Flakes.

  • Test cases updated/added. See example.

  • Commit messages are formatted like

    {component}: {description}
    
    {long description}
    

    See CONTRIBUTING for more information and recent commit messages for examples.

  • If this PR adds a new module

    • Added myself as module maintainer. See example.

Maintainer CC

@shikanime

@jcf
Copy link
Contributor Author

jcf commented Feb 19, 2024

I've tested this locally by overriding the Jujutsu program like so:

programs.jujutsu.enableZshIntegration = false;
programs.zsh.initExtra = ''
  source <(${pkgs.jujutsu}/bin/jj util completion zsh)
    compdef _jj ${pkgs.jujutsu}/bin/jj
'';

Copy link
Contributor

@ambroisie ambroisie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicate of #5016, and same issue: this shouldn't even be in Home-Manager.

EDIT: I see that #5016 was closed. I would suggest the same thing for this PR as for that one: just remove the option since the package already installs the completion files.

@jcf
Copy link
Contributor Author

jcf commented Feb 19, 2024

It sounds like the resolution was to remove this completion from Home-Manager. Would such a pull request be welcome?

jcf added a commit to jcf/home-manager that referenced this pull request Feb 19, 2024
Completion is installed by the jujutsu package itself, making this
additional setup redundant.

nix-community#5016
nix-community#5037 (review)
nix-community#5016 (comment)
@jcf
Copy link
Contributor Author

jcf commented Feb 19, 2024

I've pushed another commit to remove the shell completion entirely.

jcf added a commit to jcf/home-manager that referenced this pull request Feb 19, 2024
Completion is installed by the jujutsu package itself, making this
additional setup redundant.

nix-community#5016 (comment)
nix-community#5037 (review)
@jcf jcf changed the title jujutsu: Update completion syntax jujutsu: Remove superfluous shell completion Feb 19, 2024
Completion is installed by the jujutsu package itself, making this
additional setup redundant.

nix-community#5016 (comment)
nix-community#5037 (review)
@rycee rycee merged commit 517601b into nix-community:master Feb 20, 2024
3 checks passed
@rycee
Copy link
Member

rycee commented Feb 20, 2024

Thanks! Merged to master now 🙂

@jcf jcf deleted the patch-1 branch February 23, 2024 07:36
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.

None yet

3 participants