-
Notifications
You must be signed in to change notification settings - Fork 16
Revert "fix(completions): ignore aliases and functions named usage" #301
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
)" This reverts commit 9b88983.
not sure why this broke for some folks, reverting for now jdx/mise#5659 |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #301 +/- ##
=======================================
Coverage 63.23% 63.23%
=======================================
Files 42 42
Lines 3454 3454
Branches 3454 3454
=======================================
Hits 2184 2184
Misses 982 982
Partials 288 288 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Merged
jdx
pushed a commit
that referenced
this pull request
Jul 16, 2025
## [2.2.2](https://github.com/jdx/usage/compare/v2.2.1..v2.2.2) - 2025-07-16 ### 📚 Documentation - fix revert for git-cliff by [@jdx](https://github.com/jdx) in [#302](#302) ###◀️ Revert - Revert "fix(completions): ignore aliases and functions named usage" by [@jdx](https://github.com/jdx) in [#301](#301)
This was referenced Jul 16, 2025
jdx
pushed a commit
to jdx/mise
that referenced
this pull request
Jul 17, 2025
Includes revert commit jdx/usage#301.
tmeijn
pushed a commit
to tmeijn/dotfiles
that referenced
this pull request
Jul 30, 2025
This MR contains the following updates: | Package | Update | Change | |---|---|---| | [usage](https://github.com/jdx/usage) | minor | `2.1.1` -> `2.2.2` | 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>jdx/usage (usage)</summary> ### [`v2.2.2`](https://github.com/jdx/usage/blob/HEAD/CHANGELOG.md#222---2025-07-16) [Compare Source](jdx/usage@v2.2.1...v2.2.2) ##### 📚 Documentation - fix revert for git-cliff by [@​jdx](https://github.com/jdx) in [#​302](jdx/usage#302) #####◀️ Revert - Revert "fix(completions): ignore aliases and functions named usage" by [@​jdx](https://github.com/jdx) in [#​301](jdx/usage#301) ### [`v2.2.1`](https://github.com/jdx/usage/blob/HEAD/CHANGELOG.md#221---2025-07-16) [Compare Source](jdx/usage@v2.2.0...v2.2.1) ##### 🐛 Bug Fixes - **(completions)** ignore aliases and functions named usage by [@​risu729](https://github.com/risu729) in [#​300](jdx/usage#300) ##### 🔍 Other Changes - refactor gh release creation to avoid rate limit errors by [@​jdx](https://github.com/jdx) in [#​299](jdx/usage#299) ##### 📦️ Dependency Updates - update dawidd6/action-homebrew-bump-formula action to v5 by [@​renovate\[bot\]](https://github.com/renovate[bot]) in [#​294](jdx/usage#294) ### [`v2.2.0`](https://github.com/jdx/usage/blob/HEAD/CHANGELOG.md#220---2025-07-11) [Compare Source](jdx/usage@v2.1.1...v2.2.0) ##### 🚀 Features - Generalize bash command to support bash/zsh/fish by [@​NorthIsUp](https://github.com/NorthIsUp) in [#​280](jdx/usage#280) ##### 🐛 Bug Fixes - update wrong name package manager by [@​axemanofic](https://github.com/axemanofic) in [#​287](jdx/usage#287) - fall back to listing files on unknown completions by [@​jdx](https://github.com/jdx) in [#​296](jdx/usage#296) ##### 📚 Documentation - complete templates by [@​syhol](https://github.com/syhol) in [#​286](jdx/usage#286) - fix bad whitespace character by [@​syhol](https://github.com/syhol) in [#​288](jdx/usage#288) ##### 🔍 Other Changes - add semantic-pr-lint by [@​jdx](https://github.com/jdx) in [#​281](jdx/usage#281) - clippy by [@​jdx](https://github.com/jdx) in [f6d5e38](jdx/usage@f6d5e38) ##### 📦️ Dependency Updates - update pnpm/action-setup action to v4 by [@​renovate\[bot\]](https://github.com/renovate[bot]) in [#​278](jdx/usage#278) - update dependency semver to v7.7.2 by [@​renovate\[bot\]](https://github.com/renovate[bot]) in [#​283](jdx/usage#283) - update autofix-ci/action action to v1.3.2 by [@​renovate\[bot\]](https://github.com/renovate[bot]) in [#​289](jdx/usage#289) ##### New Contributors - [@​syhol](https://github.com/syhol) made their first contribution in [#​288](jdx/usage#288) - [@​axemanofic](https://github.com/axemanofic) made their first contribution in [#​287](jdx/usage#287) - [@​NorthIsUp](https://github.com/NorthIsUp) made their first contribution in [#​280](jdx/usage#280) </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:eyJjcmVhdGVkSW5WZXIiOiI0MS40NS4wIiwidXBkYXRlZEluVmVyIjoiNDEuNDUuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiUmVub3ZhdGUgQm90Il19-->
jdx
pushed a commit
that referenced
this pull request
Aug 6, 2025
…pt) (#304) Reverts #301. (Reapplies #300.) Replaces `command -v usage` with `type -p usage` to ignore aliases and functions. In the 1st attempt, I used `command usage`, but since `usage` (or `usage --help`) exits with an exit code `2`, it didn't work as an existence check. I apologise for the trouble. Thank you for your help as always. --- Resolves jdx/mise#5358. This PR replaces `usage` with `command usage`, to ignore aliases and functions named `usage`. Also, for consistency, use `command usage` instead of `command -v usage` to check its existence. In this way, if aliases or functions named `usage` exist but `usage` is not installed, the completions are skipped as expected. I don't think this is a case, but something like `alias usage=usage --default-flag` will be ignored by this PR.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Reverts #300