Skip to content

feat: alias mo analyse#721

Merged
tw93 merged 1 commit intotw93:mainfrom
bevanjkay:analyse
Apr 13, 2026
Merged

feat: alias mo analyse#721
tw93 merged 1 commit intotw93:mainfrom
bevanjkay:analyse

Conversation

@bevanjkay
Copy link
Copy Markdown
Contributor

Summary

This PR introduce a simple alias for the mo analyze command to mo analyse to account for spelling the command the British-English way (as I tend to do). The alternative is to alias this command locally, but I don't think there's any harm in adding this to the package.

Safety Review

  • Does this change affect cleanup, uninstall, optimize, installer, remove, analyze delete, update, or install behavior?
  • Does this change affect path validation, protected directories, symlink handling, sudo boundaries, or release/install integrity?
  • If yes, describe the new boundary or risk change clearly.

Tests

  • List the automated tests you ran.
  • List any manual checks for high-risk paths or destructive flows.

Safety-related changes

  • None.

@bevanjkay bevanjkay requested a review from tw93 as a code owner April 13, 2026 05:06
@tw93
Copy link
Copy Markdown
Owner

tw93 commented Apr 13, 2026

@bevanjkay thanks for the PR. This one falls into personal-preference territory though, since analyze already works and a local shell alias handles the analyse spelling without shipping it to every user. Going to pass on adding it to the binary itself, but appreciate you taking the time to open it.

@tw93 tw93 closed this Apr 13, 2026
@bevanjkay
Copy link
Copy Markdown
Contributor Author

bevanjkay commented Apr 13, 2026

@tw93 Thanks for considering it. Unfortunately, it's actually not as simple as an alias because it's a subcommand.

For anyone else who wants to implement something like this for themselves, the below snippet should work for zsh;

if (( $+commands[mo] )); then
  mo() {
    if [[ "$1" == "analyse" ]]; then
      command mo analyze "${@:2}"
    else
      command mo "$@"
    fi
  }
fi

if (( $+commands[mole] )); then
  mole() {
    if [[ "$1" == "analyse" ]]; then
      command mole analyze "${@:2}"
    else
      command mole "$@"
    fi
  }
fi

@tw93 tw93 reopened this Apr 13, 2026
@tw93 tw93 merged commit 0870f4e into tw93:main Apr 13, 2026
@tw93
Copy link
Copy Markdown
Owner

tw93 commented Apr 13, 2026

@bevanjkay really appreciate you pushing on this.

I sat with it again and you were right, it's worth supporting more users instead of asking everyone to carry a local alias.

Added a small mention in the README (bcccefd) so the spelling is discoverable, kept it light so nothing changes for existing users.

Thanks again for the patience here.

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.

2 participants