Skip to content

Conversation

jdx
Copy link
Owner

@jdx jdx commented Jul 16, 2025

Reverts #300

@jdx
Copy link
Owner Author

jdx commented Jul 16, 2025

not sure why this broke for some folks, reverting for now jdx/mise#5659

Copy link

codecov bot commented Jul 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 63.23%. Comparing base (e12a246) to head (bba7fdb).
Report is 1 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jdx jdx merged commit a5ed8bb into main Jul 16, 2025
5 of 6 checks passed
@jdx jdx deleted the revert-300-ignore-alias-functions branch July 16, 2025 13:43
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)
jdx pushed a commit to jdx/mise that referenced this pull request Jul 17, 2025
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 [@&#8203;jdx](https://github.com/jdx) in [#&#8203;302](jdx/usage#302)

##### ◀️ Revert

- Revert "fix(completions): ignore aliases and functions named usage" by [@&#8203;jdx](https://github.com/jdx) in [#&#8203;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 [@&#8203;risu729](https://github.com/risu729) in [#&#8203;300](jdx/usage#300)

##### 🔍 Other Changes

- refactor gh release creation to avoid rate limit errors by [@&#8203;jdx](https://github.com/jdx) in [#&#8203;299](jdx/usage#299)

##### 📦️ Dependency Updates

- update dawidd6/action-homebrew-bump-formula action to v5 by [@&#8203;renovate\[bot\]](https://github.com/renovate[bot]) in [#&#8203;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 [@&#8203;NorthIsUp](https://github.com/NorthIsUp) in [#&#8203;280](jdx/usage#280)

##### 🐛 Bug Fixes

- update wrong name package manager by [@&#8203;axemanofic](https://github.com/axemanofic) in [#&#8203;287](jdx/usage#287)
- fall back to listing files on unknown completions by [@&#8203;jdx](https://github.com/jdx) in [#&#8203;296](jdx/usage#296)

##### 📚 Documentation

- complete templates by [@&#8203;syhol](https://github.com/syhol) in [#&#8203;286](jdx/usage#286)
- fix bad whitespace character by [@&#8203;syhol](https://github.com/syhol) in [#&#8203;288](jdx/usage#288)

##### 🔍 Other Changes

- add semantic-pr-lint by [@&#8203;jdx](https://github.com/jdx) in [#&#8203;281](jdx/usage#281)
- clippy by [@&#8203;jdx](https://github.com/jdx) in [f6d5e38](jdx/usage@f6d5e38)

##### 📦️ Dependency Updates

- update pnpm/action-setup action to v4 by [@&#8203;renovate\[bot\]](https://github.com/renovate[bot]) in [#&#8203;278](jdx/usage#278)
- update dependency semver to v7.7.2 by [@&#8203;renovate\[bot\]](https://github.com/renovate[bot]) in [#&#8203;283](jdx/usage#283)
- update autofix-ci/action action to v1.3.2 by [@&#8203;renovate\[bot\]](https://github.com/renovate[bot]) in [#&#8203;289](jdx/usage#289)

##### New Contributors

- [@&#8203;syhol](https://github.com/syhol) made their first contribution in [#&#8203;288](jdx/usage#288)
- [@&#8203;axemanofic](https://github.com/axemanofic) made their first contribution in [#&#8203;287](jdx/usage#287)
- [@&#8203;NorthIsUp](https://github.com/NorthIsUp) made their first contribution in [#&#8203;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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant