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

feat(g-plane/pnpm-shell-completion): scaffold g-plane/pnpm-shell-completion #25779

Merged

Conversation

elecdeer
Copy link
Contributor

pnpm-shell-completion: a shell plugin designed to enhance the command-line experience with pnpm by providing tab-completion features.

This shell plugin calls a Rust-based executable to provide completion functionality. Managing shell plugins is outside the scope of aqua. However, since the executable to be used may vary depending on the environment, it is convenient to be able to install it with aqua.

Check List

How to confirm if this package works well

# Any repository that uses pnpm will do.
$ git clone https://github.com/pnpm/pnpm.git

$ cd pnpm

# This simulates a call from script.
# https://github.com/g-plane/pnpm-shell-completion/blob/main/pnpm-shell-completion.plugin.zsh
$ FEATURE=scripts pnpm-shell-completion
test-pkgs-main
make-lcov
pretest
prepare
watch
compile
compile-only
preinstall
remove-temp-dir
test-main
update-manifests
meta-updater
make-release-description
dev-setup
test-branch
spellcheck
lint:meta
bump
test-pkgs-branch
changeset
lint:ts
copy-artifacts
lint
release

@suzuki-shunsuke
Copy link
Member

Thank you for your contribution!

I'm not familiar with this tool, but I'm wondering if aqua can support this tool.

This tool requires to execute a script install.sh, but aqua doesn't support it.

zsh https://github.com/g-plane/pnpm-shell-completion?tab=readme-ov-file#manual

./install.zsh $ZSH_CUSTOM/plugins

fish https://github.com/g-plane/pnpm-shell-completion?tab=readme-ov-file#manual-install

fish ./install.fish ${any path that has been added in your $PATH variable}

I checked the content of tarball.

pnpm-shell-completion_aarch64-apple-darwin.tar.gz

$ tar xvzf pnpm-shell-completion_aarch64-apple-darwin.tar.gz 
x LICENSE
x README.md
x install.fish
x install.zsh
x pnpm-shell-completion
x pnpm-shell-completion.plugin.zsh
x pnpm.fish

install.zsh

set -x

if [ -z "$1" ]; then
    echo "Plugins directory not specified, please pass your zsh plugins directory as a parameter."
    exit 1
fi

if [ ! -d $1/pnpm-shell-completion ]; then
    mkdir $1/pnpm-shell-completion
fi

cp ./pnpm-shell-completion.plugin.zsh $1/pnpm-shell-completion
cp ./pnpm-shell-completion $1/pnpm-shell-completion

The install script creates the plugin directory and copies pnpm-shell-completion into it, which aqua doesn't support it.

@elecdeer
Copy link
Contributor Author

I am aware that Aqua does not support executing shell scripts.

In the install.sh, file copying is performed, but this is not crucial for the functioning of this plugin. In reality, as long as pnpm-shell-completion.plugin.zsh and pnpm-shell-completion exist in the same directory, and the .plugin.zsh is sourced from .zshrc or similar, it will work.

The former is handled by aqua i -a, and the latter can be fulfilled by adding the following script to .zshrc:

local plugin_path_dir=$(dirname $(aqua which pnpm-shell-completion))
local plugin_path="${plugin_path_dir}/pnpm-shell-completion.plugin.zsh"
source $plugin_path

I think there are other packages, like starship/starship, that require loading additional shell scripts in addition to using aqua i.

What do you think?

@suzuki-shunsuke
Copy link
Member

I see. Thank you for your explanation.
I think it looks good.
ebed885 I added the guide.

@suzuki-shunsuke suzuki-shunsuke merged commit 3e20e1c into aquaproj:main Aug 14, 2024
17 checks passed
@suzuki-shunsuke suzuki-shunsuke added the enhancement New feature or request label Aug 14, 2024
@suzuki-shunsuke suzuki-shunsuke added this to the v4.213.0 milestone Aug 14, 2024
@suzuki-shunsuke
Copy link
Member

v4.213.0 is out 🎉
https://github.com/aquaproj/aqua-registry/releases/tag/v4.213.0

tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Aug 15, 2024
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [aquaproj/aqua-registry](https://github.com/aquaproj/aqua-registry) | minor | `v4.212.0` -> `v4.213.0` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>aquaproj/aqua-registry (aquaproj/aqua-registry)</summary>

### [`v4.213.0`](https://github.com/aquaproj/aqua-registry/releases/tag/v4.213.0)

[Compare Source](aquaproj/aqua-registry@v4.212.0...v4.213.0)

[Issues](https://github.com/aquaproj/aqua-registry/issues?q=is%3Aissue+milestone%3Av4.213.0) | [Merge Requests](https://github.com/aquaproj/aqua-registry/pulls?q=is%3Apr+milestone%3Av4.213.0) | aquaproj/aqua-registry@v4.212.0...v4.213.0

#### 🎉 New Packages

[#&#8203;25852](aquaproj/aqua-registry#25852) [cloudnative-pg/cloudnative-pg/kubectl-cnpg](https://github.com/cloudnative-pg/cloudnative-pg): CloudNativePG is a comprehensive platform designed to seamlessly manage PostgreSQL databases within Kubernetes environments, covering the entire operational lifecycle from initial deployment to ongoing maintenance [@&#8203;boris-smidt-klarrio](https://github.com/boris-smidt-klarrio)
[#&#8203;25779](aquaproj/aqua-registry#25779) [g-plane/pnpm-shell-completion](https://github.com/g-plane/pnpm-shell-completion): a shell plugin designed to enhance the command-line experience with [pnpm](https://pnpm.io/) by providing tab-completion features [@&#8203;elecdeer](https://github.com/elecdeer)
[#&#8203;25850](aquaproj/aqua-registry#25850) [shenwei356/rush](https://github.com/shenwei356/rush): A cross-platform command-line tool for executing jobs in parallel [@&#8203;boris-smidt-klarrio](https://github.com/boris-smidt-klarrio)

#### Fixes

[#&#8203;25838](aquaproj/aqua-registry#25838) abiosoft/colima: Regenerate the setting
[#&#8203;25789](aquaproj/aqua-registry#25789) caddyserver/caddy: Add cosign configs [@&#8203;sapphi-red](https://github.com/sapphi-red)
[#&#8203;25788](aquaproj/aqua-registry#25788) hadolint/hadolint: Re-scaffold hadolint/hadolint to include checksum [@&#8203;sapphi-red](https://github.com/sapphi-red)
[#&#8203;25829](aquaproj/aqua-registry#25829) volta-cli/volta: Follow up changes of volta v2.0.0 for macOS

> Volta will now use a universal binary on Mac, rather than separate Intel- & ARM-specific builds (volta-cli/volta#1635)

-   https://github.com/volta-cli/volta/releases/tag/v2.0.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40NDAuNyIsInVwZGF0ZWRJblZlciI6IjM3LjQ0MC43IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiXX0=-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants