-
Notifications
You must be signed in to change notification settings - Fork 2
feat: add pnpm completion script #23
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
base: main
Are you sure you want to change the base?
Conversation
commit: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing work, this made me way more excited on tab again.
The reason is that we cover all of the ecosystem now, even those who do not use tab for their libraries like regular users can benefit from tab in a tangible way.
|
03e52e5
to
07acf01
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks really good, i just left a suggestion in your script dunno if we should leave it for later on or it could be manageable to handle it in this same pr, i also would like to add is a bit of docs, like adding a section in the README.md
case $state in | ||
filter) | ||
if [[ -f ./pnpm-workspace.yaml ]] && [[ -x "$pnpm_comp_bin" ]]; then | ||
_pnpm_tab_debug "Using pnpm-shell-completion for filter packages" | ||
_values 'filter packages' $(FEATURE=filter $pnpm_comp_bin) | ||
else | ||
_pnpm_tab_debug "No workspace or pnpm-shell-completion for filter" | ||
_message "package filter" | ||
fi | ||
;; | ||
scripts) | ||
if [[ -x "$pnpm_comp_bin" ]]; then | ||
_pnpm_tab_debug "Using pnpm-shell-completion for scripts" | ||
_values 'scripts' $(FEATURE=scripts TARGET_PKG=$target_pkg ZSH=true $pnpm_comp_bin) \ | ||
add remove install update publish | ||
else | ||
_pnpm_tab_debug "Using basic pnpm commands (no pnpm-shell-completion)" | ||
_values 'scripts' \ | ||
'add:Add a dependency' \ | ||
'install:Install dependencies' \ | ||
'remove:Remove a dependency' \ | ||
'update:Update dependencies' \ | ||
'publish:Publish package' \ | ||
'run:Run script' | ||
fi | ||
;; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'm just throwing an idea here, but dunno if you explored the possibility of having a caching utility, then use it within the filter completion case to use the cache and finally clean that cache file when the script exits.
No description provided.