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

git-worktree-switcher: remove shell integrations #6440

Conversation

ambroisie
Copy link
Contributor

They're redundant, given that the packages already install the completion files through installShellCompletion.

Description

See my comment on the previous PR.

Haven't updated the tests yet, as I can't run them on my current computer. But presumably they should just be removed.

Checklist

  • Change is backwards compatible.

  • Code formatted with ./format.

  • Code tested through nix-shell --pure tests -A run.all
    or nix build --reference-lock-file flake.lock ./tests#test-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

@mateusauler @jiriks74

@Rosuavio
Copy link
Contributor

If the only options are enable and package, shouldn't we just remove the module and direct users to add the package to home.packages.

@ambroisie ambroisie force-pushed the remove-git-worktree-switcher-integration branch from 5662c05 to 1dcb400 Compare February 12, 2025 14:53
They're redundant, given that the packages already install the
completion files through `installShellCompletion`.
@ambroisie ambroisie force-pushed the remove-git-worktree-switcher-integration branch from 1dcb400 to cfca492 Compare February 12, 2025 15:44
@jiriks74
Copy link

The shell integrations are for loading the utility, not shell completions.

It is to create a function in the shell so that we can change the directory without entering a subshell. See yankeexe/git-worktree-switcher#15 on the original project's repository. The utility cannot be used without sourceing/evaluating the mentioned function:

image

The completions are in a separate file, not in the wt utility.

See screenshots below:

BASH

image

ZSH

image

FISH

image

@ambroisie
Copy link
Contributor Author

@jiriks74 ah, my mistake, sorry. Thank you for the context, I'll close the PR.

@ambroisie ambroisie closed this Feb 12, 2025
@jiriks74
Copy link

Thanks.

Please try to look into the project and what the functionality that you're trying to remove actually does so that we can avoid this in the future.

@ambroisie
Copy link
Contributor Author

Please try to look into the project and what the functionality that you're trying to remove actually does so that we can avoid this in the future.

I did look into it and found the unmerged PR you linked to, hence my thinking it was not yet a functionality of the project and misidentifying it as completion.

@jiriks74
Copy link

I did look into it and found the unmerged PR you linked to, hence my thinking it was not yet a functionality of the project and misidentifying it as completion.

Ok, I now get where you're coming from. However the original project is long dead and everything now continues on https://github.com/mateusauler/git-worktree-switcher.

I assume that you just used Google/GitHub's search to find the source. While it will work most of the time I'd recommend getting the actual source from the package metadata or the package file itself. This way you'll avoid using the wrong repo as a reference and you'll avoid people trying to typosquat or forks with malware.

image

The home page is also set to the repository where the development happens:

image

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.

3 participants