powerlevel10k: oh-my-zsh plugins are not working with p10k
Hello, adding plugins on ~/.zshrc like git doesn’t work and does nothing. I wanted to use the alias from the git plugin. Without p10k this works. Can you guys help me out?
#Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH=$HOME/.oh-my-zsh
# Which plugins would you like to load?
# Standard plugins can be found in $ZSH/plugins/
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(git ZSH-Syntax-highlighting common-aliases)
source $ZSH/oh-my-zsh.sh
source ~/powerlevel10k/powerlevel10k.zsh-theme
# User configuration
# export MANPATH="/usr/local/man:$MANPATH"
# You may need to manually set your language environment
# export LANG=en_US.UTF-8
# Preferred editor for local and remote sessions
# if [[ -n $SSH_CONNECTION ]]; then
# export EDITOR='vim'
# else
# export EDITOR='mvim'
# fi
# Compilation flags
# export ARCHFLAGS="-arch x86_64"
# Set personal aliases, overriding those provided by oh-my-zsh libs,
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
# For a full list of active aliases, run `alias`.
#
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"
# alias gtp="cd projects"
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
# Increases the movement speed of cursor
xset r rate 190 35
# FZF with fd library
# For key bindings sourced fzf key binding with the instructions from command "apt-cache show fzf"
source /usr/share/doc/fzf/examples/key-bindings.zsh
#Append this line to ~/.zshrc to enable fuzzy auto-completion for Zsh:
source /usr/share/doc/fzf/examples/completion.zsh
# For only files you can use it like `fdfind --type f`
export FZF_DEFAULT_COMMAND='fdfind --color=always --exclude .git'
export FZF_DEFAULT_OPTS="--ansi"
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
# nvm
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
#hide warning and stars zsh prompts quickly
#typeset -g POWERLEVEL9K_INSTANT_PROMPT=quiet
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 23 (10 by maintainers)
I had the same problem, all you need to do is to add this line before the plugins block
source ~/.oh-my-zsh/plugins/git/git.plugin.zshI’ve found the root cause.
That’s another way to solve the problem.
Please record and post a video of your doing this ☝️
.zshrcyou’ve posted earlier to make it work?You’ve already answered the first question – alias
gstdoes not work. Could you answer the remaining two questions? You don’t need to provide any other information.Here’s how an answer to the question number 2 might look like:
Here’s how an answer to the question number 3 might look like:
Which alias? How are you checking whether it works? Which changes do you need to make to
.zshrcyou’ve posted earlier to make it work?