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

Add volta (JS toolchains as code) #552

Closed
wants to merge 3 commits into from

Conversation

meinzer1899
Copy link
Member

@meinzer1899 meinzer1899 commented Feb 7, 2024

Adds cowboyd/zsh-volta (program) and OMZP::volta (completions) for volta.

Adds cowboyd/zsh-volta (program) and OMZP::volta (completions).

Signed-off-by: sebastian <[email protected]>
Copy link

trunk-io bot commented Feb 7, 2024

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

# usually completions are located at $HOME/.zi/completions
zi wait'0b' lucid for \
blockf has'volta' \
atinit'ZSH_CACHE_DIR=$ZI[HOME_DIR]' \
Copy link
Member Author

@meinzer1899 meinzer1899 Feb 7, 2024

Choose a reason for hiding this comment

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

@Reviewer:
The completions plugin OMZP::volta searches for the completion file to be located at $ZSH_CACHE_DIR/completions/_volta.

As (at least on my system) ZSH_CACHE_DIR was not defined (maybe a oh-my-zsh variable?), we set the variable to the directory, where the completions are stored, ZI[HOME_DIR].

My question is, does this work for other users as well? Where are their completions located?

I found these options:

  1. Use ZI[CACHE_DIR] instead of ZI[HOME_DIR] to be compatible with the ZSH_CACHE_DIR variable the plugins asks for. This did not work on my system, because the variable was not set and therefore the completions plugin could not find a completions directory under that location.
  2. (preferred) Use ZI[COMPLETIONS_DIR] , but this expands to /home/user/.zi/completions and is therefore not compatible with the path OMZP::volta expects the completion.

Copy link
Member

Choose a reason for hiding this comment

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

My question is, does this work for other users as well? Where are their completions located?

This is a good question.

It's only 14 lines of code for simple tasks and is done poorly.

  1. The volta completion plugin actually is function.
  2. Variable ZSH_CACHE_DIR shouldn't be hardcoded in this situation.
  3. It should follow standards or be reasonable.

We can't include such a plugin in our wiki as an example. I should have a solution for this in the upcoming weekend.

@meinzer1899
Copy link
Member Author

How can we tell zi not to remove the volta completion?
grafik

@meinzer1899 meinzer1899 requested a review from ss-o February 12, 2024 11:11
@ss-o ss-o self-assigned this Feb 21, 2024
@ss-o
Copy link
Member

ss-o commented Feb 21, 2024

How can we tell zi not to remove the volta completion? grafik

Sorry for the late response. Zi can't tell that it is a completion as I mentioned previously.

@ss-o ss-o added the triage 📑 The issue is awaiting investigation. label Feb 21, 2024
@meinzer1899
Copy link
Member Author

Sorry for the late response. Zi can't tell that it's as I mentioned previously.

Don't feel any pressure on this, I'm happy that you take a look.

Copy link
Contributor

There hasn't been any activity on this pull request recently, and in order to prioritize active work, it has been marked as stale. This PR will be closed and locked in 7 days if no further activity occurs. Thank you for your contributions!

@github-actions github-actions bot added the stale 👻 No activity for quite some time. label Mar 23, 2024
@meinzer1899 meinzer1899 removed the stale 👻 No activity for quite some time. label Mar 23, 2024
Copy link
Contributor

There hasn't been any activity on this pull request recently, and in order to prioritize active work, it has been marked as stale. This PR will be closed and locked in 7 days if no further activity occurs. Thank you for your contributions!

@github-actions github-actions bot added the stale 👻 No activity for quite some time. label Apr 23, 2024
@github-actions github-actions bot closed this May 1, 2024
@ss-o
Copy link
Member

ss-o commented May 9, 2024

Pull Request closed and locked due to lack of activity. If you'd like to build on this closed PR, you can clone it using this method: https://stackoverflow.com/a/14969986 Then open a new PR, referencing this closed PR in your message.

@z-shell z-shell locked and limited conversation to collaborators May 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
stale 👻 No activity for quite some time. triage 📑 The issue is awaiting investigation.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants