Skip to content

Commit

Permalink
Update _zqs-update-stale-settings-files
Browse files Browse the repository at this point in the history
- Update `_zqs-update-stale-settings-files` to also update omz toggling
- Run `_zqs-update-stale-settings-files`

Signed-off-by: Joe Block <jpb@unixorn.net>
  • Loading branch information
unixorn committed May 15, 2022
1 parent 039b482 commit 48ca305
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .zsh-quickstart-local-plugins-example
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
ZGEN_LOADED=()
ZGEN_COMPLETIONS=()

if [[ $(_zqs-get-setting load-omz-plugins false) == 'true' ]]; then
if [[ $(_zqs-get-setting load-omz-plugins true) == 'true' ]]; then
zgenom oh-my-zsh
fi

Expand Down Expand Up @@ -98,7 +98,7 @@ zgenom load peterhurford/git-it-on.zsh
# in a repository securely by encrypting them with gnupg.
zgenom load StackExchange/blackbox

if [[ $(_zqs-get-setting load-omz-plugins false) == 'true' ]]; then
if [[ $(_zqs-get-setting load-omz-plugins true) == 'true' ]]; then
# Load some oh-my-zsh plugins
zgenom oh-my-zsh plugins/pip
zgenom oh-my-zsh plugins/sudo
Expand Down
2 changes: 1 addition & 1 deletion Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ The quickstart automatically autoloads zmv. If you want to disable that, create

### Disabling oh-my-zsh

If you don't want `zgenom` to load the oh-my-zsh defaults, create `.zsh-quickstart-no-omz` in your home directory.
If you don't want `zgenom` to load the oh-my-zsh defaults, run `zws-disable-omz-plugins`.

## FAQ

Expand Down
4 changes: 2 additions & 2 deletions zsh/.zgen-setup
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ load-starter-plugin-list() {
ZGEN_LOADED=()
ZGEN_COMPLETIONS=()

if [[ ! -f ~/.zsh-quickstart-no-omz ]] || [[ $(_zqs-get-setting load-omz-plugins false) == 'true' ]]; then
zgenom oh-my-zsh
if [[ ! -f ~/.zsh-quickstart-no-omz ]] || [[ $(_zqs-get-setting load-omz-plugins true) == 'true' ]]; then
zgenom oh-my-zsh
fi

# If you want to customize your plugin list, create a file named
Expand Down
8 changes: 8 additions & 0 deletions zsh/.zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,20 @@ _zqs-purge-setting() {
rm -f "$sfile"
}

# Convert the old settings files into new style settings
function _zqs-update-stale-settings-files() {
if [[ -f ~/.zsh-quickstart-use-bullet-train ]]; then
_zqs-set-setting bullet-train true
rm -f ~/.zsh-quickstart-use-bullet-train
echo "Converted old ~/.zsh-quickstart-use-bullet-train to new settings format"
fi
if [[ -f ~/.zsh-quickstart-no-omz ]]; then
_zqs-set-setting load-omz-plugins false
rm -f ~/.zsh-quickstart-no-omz
echo "Converted old ~/.zsh-quickstart-no-omz to new settings format"
fi
}
_zqs-update-stale-settings-files

# Add some quickstart feature toggle functions
function zsh-quickstart-select-bullet-train() {
Expand Down

0 comments on commit 48ca305

Please sign in to comment.