Skip to content

Commit

Permalink
Merge pull request #287 from unixorn/minor-cleanups
Browse files Browse the repository at this point in the history
Add support for `so-fancy/diff-so-fancy`
  • Loading branch information
unixorn committed Apr 1, 2024
2 parents 14eb981 + da3060f commit 70a356e
Show file tree
Hide file tree
Showing 5 changed files with 177 additions and 100 deletions.
5 changes: 5 additions & 0 deletions .zsh-quickstart-local-plugins-example
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@ zgenom load djui/alias-tips
# Add my collection of git helper scripts.
zgenom load unixorn/git-extra-commands

# Add diff-so-fancy so git can use it
if [[ "$(_zqs-get-setting diff-so-fancy true)" == 'true' ]]; then
zgenom load so-fancy/diff-so-fancy
fi

# Supercharge your history search with fzf
zgenom load unixorn/fzf-zsh-plugin

Expand Down
140 changes: 77 additions & 63 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,67 +10,73 @@
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
## Table of Contents

- [Announcement](#announcement)
- [Installation](#installation)
- [Prerequisites](#prerequisites)
- [Fonts](#fonts)
- [OS-specific setup](#os-specific-setup)
- [fzf](#fzf)
- [macOS](#macos)
- [Linux](#linux)
- [Set up Zgenom and the starter kit](#set-up-zgenom-and-the-starter-kit)
- [Contents of the kit](#contents-of-the-kit)
- [Included plugins](#included-plugins)
- [Customizing the kit](#customizing-the-kit)
- [Behavior toggles](#behavior-toggles)
- [zqs](#zqs)
- [zqs check-for-updates](#zqs-check-for-updates)
- [zqs-disable-bindkey-handling](#zqs-disable-bindkey-handling)
- [zqs-enable-bindkey-handling](#zqs-enable-bindkey-handling)
- [zqs disable-omz-plugins](#zqs-disable-omz-plugins)
- [zqs enable-control-c-decorator](#zqs-enable-control-c-decorator)
- [zqs disable-control-c-decorator](#zqs-disable-control-c-decorator)
- [zqs enable-omz-plugins](#zqs-enable-omz-plugins)
- [zqs enable-ssh-askpass-require](#zqs-enable-ssh-askpass-require)
- [zqs disable-ssh-askpass-require](#zqs-disable-ssh-askpass-require)
- [zqs-disable-ssh-key-listing](#zqs-disable-ssh-key-listing)
- [zqs-enable-ssh-key-listing](#zqs-enable-ssh-key-listing)
- [zqs-disable-ssh-key-loading](#zqs-disable-ssh-key-loading)
- [zqs-enable-ssh-key-loading](#zqs-enable-ssh-key-loading)
- [zqs-disable-zmv-autoloading](#zqs-disable-zmv-autoloading)
- [zqs-enable-zmv-autoloading](#zqs-enable-zmv-autoloading)
- [zqs selfupdate](#zqs-selfupdate)
- [zqs update](#zqs-update)
- [zqs update-plugins](#zqs-update-plugins)
- [zqs cleanup](#zqs-cleanup)
- [zqs get-setting](#zqs-get-setting)
- [zqs set-setting](#zqs-set-setting)
- [zqs delete-setting](#zqs-delete-setting)
- [Functions and Aliases](#functions-and-aliases)
- [Customizing with ~/.zshrc.d](#customizing-with-zshrcd)
- [I like a plugin, but some of the aliases and functions it installs overwrite other commands or aliases I use](#i-like-a-plugin-but-some-of-the-aliases-and-functions-it-installs-overwrite-other-commands-or-aliases-i-use)
- [ZSH options](#zsh-options)
- [Fragment file directories](#fragment-file-directories)
- [Self-update Settings](#self-update-settings)
- [Customizing the plugin list](#customizing-the-plugin-list)
- [Using fragment files](#using-fragment-files)
- [Complete plugin list replacement](#complete-plugin-list-replacement)
- [Disabling zmv](#disabling-zmv)
- [Disabling oh-my-zsh](#disabling-oh-my-zsh)
- [FAQ](#faq)
- [How do I reconfigure the prompt?](#how-do-i-reconfigure-the-prompt)
- [Powerlevel 10k warns that there is console output during startup](#powerlevel-10k-warns-that-there-is-console-output-during-startup)
- [I added a new completion plugin, and it isn't working](#i-added-a-new-completion-plugin-and-it-isnt-working)
- [I get a git error when I try to update the kit](#i-get-a-git-error-when-i-try-to-update-the-kit)
- [GNU stow is warning that stowing zsh would cause conflicts](#gnu-stow-is-warning-that-stowing-zsh-would-cause-conflicts)
- [_arguments:comparguments:325: can only be called from completion function](#_argumentscomparguments325-can-only-be-called-from-completion-function)
- [Could not open a connection to your authentication agent](#could-not-open-a-connection-to-your-authentication-agent)
- [I want to pin a plugin version](#i-want-to-pin-a-plugin-version)
- [Other Resources](#other-resources)
- [ZSH](#zsh)
- [Dotfiles in general](#dotfiles-in-general)
- [Vim](#vim)
- [Thanks](#thanks)
- [ZSH Quickstart Kit](#zsh-quickstart-kit)
- [Table of Contents](#table-of-contents)
- [Announcement](#announcement)
- [Installation](#installation)
- [Prerequisites](#prerequisites)
- [Fonts](#fonts)
- [OS-specific setup](#os-specific-setup)
- [fzf](#fzf)
- [macOS](#macos)
- [Linux](#linux)
- [Set up Zgenom and the starter kit](#set-up-zgenom-and-the-starter-kit)
- [Contents of the kit](#contents-of-the-kit)
- [Included plugins](#included-plugins)
- [Customizing the kit](#customizing-the-kit)
- [Behavior toggles](#behavior-toggles)
- [zqs](#zqs)
- [zqs check-for-updates](#zqs-check-for-updates)
- [zqs disable-bindkey-handling](#zqs-disable-bindkey-handling)
- [zqs enable-bindkey-handling](#zqs-enable-bindkey-handling)
- [zqs disable-diff-so-fancy](#zqs-disable-diff-so-fancy)
- [zqs enable-diff-so-fancy](#zqs-enable-diff-so-fancy)
- [zqs disable-omz-plugins](#zqs-disable-omz-plugins)
- [zqs enable-control-c-decorator](#zqs-enable-control-c-decorator)
- [zqs disable-control-c-decorator](#zqs-disable-control-c-decorator)
- [zqs enable-omz-plugins](#zqs-enable-omz-plugins)
- [zqs enable-ssh-askpass-require](#zqs-enable-ssh-askpass-require)
- [zqs disable-ssh-askpass-require](#zqs-disable-ssh-askpass-require)
- [zqs-disable-ssh-key-listing](#zqs-disable-ssh-key-listing)
- [zqs-enable-ssh-key-listing](#zqs-enable-ssh-key-listing)
- [zqs-disable-ssh-key-loading](#zqs-disable-ssh-key-loading)
- [zqs-enable-ssh-key-loading](#zqs-enable-ssh-key-loading)
- [zqs-disable-zmv-autoloading](#zqs-disable-zmv-autoloading)
- [zqs-enable-zmv-autoloading](#zqs-enable-zmv-autoloading)
- [\`zqs-disable-zsh-profiling](#zqs-disable-zsh-profiling)
- [\`zqs-enable-zsh-profiling](#zqs-enable-zsh-profiling)
- [zqs selfupdate](#zqs-selfupdate)
- [zqs update](#zqs-update)
- [zqs update-plugins](#zqs-update-plugins)
- [zqs cleanup](#zqs-cleanup)
- [zqs get-setting](#zqs-get-setting)
- [zqs set-setting](#zqs-set-setting)
- [zqs delete-setting](#zqs-delete-setting)
- [Functions and Aliases](#functions-and-aliases)
- [Customizing with ~/.zshrc.d](#customizing-with-zshrcd)
- [I like a plugin, but some of the aliases and functions it installs overwrite other commands or aliases I use](#i-like-a-plugin-but-some-of-the-aliases-and-functions-it-installs-overwrite-other-commands-or-aliases-i-use)
- [ZSH options](#zsh-options)
- [Fragment file directories](#fragment-file-directories)
- [Self-update Settings](#self-update-settings)
- [Customizing the plugin list](#customizing-the-plugin-list)
- [Using fragment files](#using-fragment-files)
- [Complete plugin list replacement](#complete-plugin-list-replacement)
- [Disabling zmv](#disabling-zmv)
- [Disabling oh-my-zsh](#disabling-oh-my-zsh)
- [FAQ](#faq)
- [How do I reconfigure the prompt?](#how-do-i-reconfigure-the-prompt)
- [Powerlevel 10k warns that there is console output during startup](#powerlevel-10k-warns-that-there-is-console-output-during-startup)
- [I added a new completion plugin, and it isn't working](#i-added-a-new-completion-plugin-and-it-isnt-working)
- [I get a git error when I try to update the kit](#i-get-a-git-error-when-i-try-to-update-the-kit)
- [GNU stow is warning that stowing zsh would cause conflicts](#gnu-stow-is-warning-that-stowing-zsh-would-cause-conflicts)
- [\_arguments:comparguments:325: can only be called from completion function](#_argumentscomparguments325-can-only-be-called-from-completion-function)
- [Could not open a connection to your authentication agent](#could-not-open-a-connection-to-your-authentication-agent)
- [I want to pin a plugin version](#i-want-to-pin-a-plugin-version)
- [Other Resources](#other-resources)
- [ZSH](#zsh)
- [Dotfiles in general](#dotfiles-in-general)
- [Vim](#vim)
- [Thanks](#thanks)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->

Expand Down Expand Up @@ -242,14 +248,22 @@ As of 2021-11-13, I've added a `zqs` command to start exposing some of the confi

Updates the quickstart kit if it has been longer than seven days since the last update.

##### zqs-disable-bindkey-handling
##### zqs disable-bindkey-handling

Disable `bindkey` setup and alias expansion in the quickstart `.zshrc` so people can use plugins like [globalias](https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/globalias) to handle it instead.

##### zqs-enable-bindkey-handling
##### zqs enable-bindkey-handling

Let the quickstart's `.zshrc` configure `bindkey` setup and alias expansion. This is the default behavior.

##### zqs disable-diff-so-fancy

Stop loading the [diff-so-fancy](https://github.com/so-fancy/diff-so-fancy) plugin starting with the next ZSH session.

##### zqs enable-diff-so-fancy

Start loading the [diff-so-fancy](https://github.com/so-fancy/diff-so-fancy) plugin starting with the next ZSH session. This is the default behavior.

##### zqs disable-omz-plugins

Set the quickstart to not include any oh-my-zsh plugins from the standard plugin list. Loading omz plugins can make terminal startup significantly slower.
Expand Down
10 changes: 9 additions & 1 deletion zsh/.zgen-setup
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,11 @@ load-starter-plugin-list() {
# Add my collection of git helper scripts.
zgenom load unixorn/git-extra-commands

# Add diff-so-fancy so git can use it
if [[ "$(_zqs-get-setting diff-so-fancy true)" == 'true' ]]; then
zgenom load so-fancy/diff-so-fancy
fi

# Supercharge your history search with fzf
zgenom load unixorn/fzf-zsh-plugin

Expand Down Expand Up @@ -153,9 +158,12 @@ load-starter-plugin-list() {
zgenom oh-my-zsh plugins/screen
zgenom oh-my-zsh plugins/vagrant

if (( $+commands[brew] )); then
zgenom oh-my-zsh plugins/brew
fi

if [ $(uname -a | grep -ci Darwin) = 1 ]; then
# Load macOS-specific plugins
zgenom oh-my-zsh plugins/brew
zgenom oh-my-zsh plugins/macos
fi
fi
Expand Down
3 changes: 2 additions & 1 deletion zsh/.zsh_functions
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ function hgrep-full() {
fi
}

# easier to type, leaving hgrep_full for backwards compatibility
# hgrep-full is easier to type, leaving hgrep_full for backwards compatibility
function hgrep_full() {
echo "hgrep_full is deprecated, use hgrep-full"
hgrep-full "$@"
}

Expand Down

0 comments on commit 70a356e

Please sign in to comment.