Skip to content
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

feat: Toggle omz script #249

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

Sharkitty
Copy link

Description

Adding a script to install/uninstall ohmyzsh easily, and adding just recipes for it. The reason the implementation is in a separate script and not directly in the just files, is to make this script usable in yafti as well.

Context

This feature is related to #246. I've already tested this downstream and I'm proposing this upstream because @castrojo showed interest in adding this feature to Bluefin as well.

Usage

shell script

The shell script can either be called directly, without argument, in which case it will check if omz is already installed, if it is it will propose the user to uninstall it. Otherwise it will propose the user to install it.

You can directly call the install or uninstall subcommands as arguments.

These flags are also available:

  • -i / --interactive -> Use this script interactively (Default).
  • -n / --non-interactive -> Use this script non interactively (This is especially useful if you want to call this from a GUI.
  • -h / --help -> Print this help page and exit.

just recipes

There are three just recipes available:

  • ujust toggle-ohmyzsh / ujust toggle-omz -> Install ohmyzsh if it's not installed, uninstall it if it's already installed.
  • ujust install-ohmyzsh / ujust install-omz -> Install ohmyzsh.
  • ujust uninstall-ohmyzsh / ujust-uninstall-omz -> Uninstall ohmyzsh.

Additional note

You might need to logout/log back in or restart when chsh for the change to work correctly.

Testing

  • Run ujust toggle-omz twice.
  • Run ujust install-omz.
  • Run ujust uninstall-omz.
  • You can also play around with the shell script directly.

@Sharkitty Sharkitty changed the title Feature: Toggle omz script feat: Toggle omz script Apr 10, 2024
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