-
Notifications
You must be signed in to change notification settings - Fork 156
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
Does not work with zinit #110
Comments
I have it mostly working (with some minor bugs and inconsistencies) with: $ cat ~/.zshrc
...
...
# Plugins {{{
source "$ZDOTDIR/.zinit/bin/zinit.zsh"
autoload -Uz _zinit
(( ${+_comps} )) && _comps[zinit]=_zinit
# oh-my-zsh plugins
zinit ice wait'!'
zinit snippet OMZ::lib/git.zsh
zinit ice wait'!'
zinit snippet OMZP::git
zinit ice wait'!'
zinit snippet OMZP::fzf
zinit ice wait'!'
zinit snippet OMZP::ssh-agent
# https://github.com/zdharma/zinit-configs/blob/a60ff64823778969ce2b66230fd8cfb1a957fe89/psprint/zshrc.zsh#L277
# Fast-syntax-highlighting & autosuggestions
zinit wait lucid for \
atinit"ZINIT[COMPINIT_OPTS]=-C; zpcompinit; zpcdreplay" \
zdharma/fast-syntax-highlighting \
atload"!_zsh_autosuggest_start" \
zsh-users/zsh-autosuggestions \
blockf \
zsh-users/zsh-completions
# GitHub Plugins
zinit ice wait'!'
zinit light zsh-users/zsh-history-substring-search I have this in my
|
With the PR #108 it's easier to get a configured # Your configuration for the plugins
export ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=#586e75'
export HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_FOUND='bg=#d33682,fg=#002b36,bold'
export HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_NOT_FOUND='bg=#dc322f,fg=#002b36,bold'
function _history_substring_search_config() {
bindkey '^[[A' history-substring-search-up
bindkey '^[[B' history-substring-search-down
}
# Syntax highlighting
zinit ice wait
zinit load zsh-users/zsh-syntax-highlighting
# NOTE The order is important here since it should be loaded before zsh-history-substring-search:
# https://github.com/zsh-users/zsh-history-substring-search#usage
# History substring search
zinit ice wait atload'_history_substring_search_config' \
ver'dont-overwrite-config'
zinit load 'ericbn/zsh-history-substring-search'
# NOTE When #108 will be merged the three previous lines will be replaced by:
# zinit load 'zsh-users/zsh-history-substring-search'
# zinit ice wait atload'_history_substring_search_config' Note than I'm not using OMZ here tho. |
This isn't OS agnostic (only works on macOS for me, fails on Linux). You should use this syntax: OS=$(uname -s)
if [ "$OS" = "Darwin" ]; then
bindkey '^[[A' history-substring-search-up
bindkey '^[[B' history-substring-search-down
elif [ "$OS" = "Linux" ]; then
# https://superuser.com/a/1296543
# key dict is defined in /etc/zsh/zshrc
bindkey "$key[Up]" history-substring-search-up
bindkey "$key[Down]" history-substring-search-down
fi Edit: Updated syntax |
Looks like it's off-topic. The config was the more concise example I could conjure, see here and there for my actual configuration.
|
This was where I got the syntax for my config originally, which broke when I moved my config to Linux. Replacing these weird escape sequences with
The comment at the top of the file is just outdated (fixed in the last commit, thanks for pointing that out). I use this config on my Linux box daily. And TIL that I could have phrased my response better. All I meant was that if I had used |
OP here. Still not really getting what I should do to have the plugin working. For what matters, the |
Try initializing it like I do: # GitHub Plugins
zinit ice wait'!'
zinit light zsh-users/zsh-history-substring-search instead of using |
Thank you @alichtman ! Trying to do as you said prompts me for username and password for GitHub, which is weird (why would zinit want to know them to just clone a repo?) plus I do have ssh set up (why isn't zinit using that instead?). For me it worked by remixing your example with the Now it works, but... is the fact one must use this way to load it (as opposed to use a regular "snippet" as for all things OMZ) make me feel this issue is still valid (please correct me if I am mistaken). Thanks both for your help! :) EDIT: The only minor annoyance is that each time a new terminal windows loads, I got the message: |
I would advise against using this fork (that's currently even with this repo), and use the master repo instead. |
@quasipedia To get rid of that message just add |
Now that PR #108 is merged, can we close this issue? |
I still use
@quasipedia you can add |
Describe the bug
Upon fresh installation and configuration of zinit and all the rest, the plugin does not work, and throw a
no such file or directory
error. This is the actual output (OMZ::
is just the zinit syntax to consume oh-my-zsh plugins). Other plugins (7 in total) work flawlessly.The functionality of the plugin is not there (so the error is not just cosmetic: the plugin does not work).
To Reproduce
.zshrc
att the following line:zinit snippet OMZ::plugins/history-substring-search/history-substring-search.plugin.zsh
, save and exit.Desktop (please complete the following information):
zinit
andzsh-history-substring-search
are the latest version available on GitHubThe text was updated successfully, but these errors were encountered: