Skip to content

feat: support custom prefix in sudo plugin and update README accordingly #13161

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

xlebpushek
Copy link

add configurable prefix support to sudo plugin with alias reminder

Standards checklist:

  • The PR title is descriptive.
  • The PR doesn't replicate another PR which is already open.
  • I have read the contribution guide and followed all the instructions.
  • The code follows the code style guide detailed in the wiki.
  • The code is mine or it's from somewhere with an MIT-compatible license.
  • The code is efficient, to the best of my ability, and does not waste computer resources.
  • The code is stable and I have tested it myself, to the best of my abilities.
  • If the code introduces new aliases, I provide a valid use case for all plugin users down below.

Changes:

  • Introduced ZSH_SUDO_PLUGIN_PREFIX variable to allow custom command prefix instead of default 'sudo'
  • Updated command substitution logic to handle prefix and prefix -e (sudoedit) properly
  • Enhanced README with usage examples and a note about creating alias for custom prefixes
  • Maintains default behavior wix is specifiedhen no prefix is specified

Other comments:

...

feat: add configurable prefix support to sudo plugin with alias reminder

- Introduced ZSH_SUDO_PLUGIN_PREFIX variable to allow custom command prefix instead of default 'sudo'
- Updated command substitution logic to handle prefix and prefix -e (sudoedit) properly
- Enhanced README with usage examples and a note about creating alias for custom prefixes
- Maintains default behavior when no prefix is specified
@ohmyzsh ohmyzsh bot added Area: plugin Issue or PR related to a plugin Topic: bindkey Pull Request or issue regarding keyboard shortcuts Type: documentation Documentation issue or Pull Request labels Jun 8, 2025
@ohmyzsh ohmyzsh bot added this to Main project Jun 8, 2025
@github-project-automation github-project-automation bot moved this to Backlog in Main project Jun 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: plugin Issue or PR related to a plugin Topic: bindkey Pull Request or issue regarding keyboard shortcuts Type: documentation Documentation issue or Pull Request
Projects
Status: Backlog
Development

Successfully merging this pull request may close these issues.

1 participant