Closed ravensorrow closed 1 month ago
My .zshrc for context is as follows.
# eval $(keychain --eval ~/.ssh/github.com)
# 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
# PATH
PATH=$PATH:/usr/local/go/bin
# Dir to store zinit and plugins
ZINIT_HOME="${XDG_DATA_HOME:-${HOME}/.local/share}/zinit/zinit.git"
# Download zinit, if it's not there yet
if [ ! -d "$ZINIT_HOME" ]; then
mkdir -p "$(dirname $ZINIT_HOME)"
git clone https://github.com/zdharma-continuum/zinit.git "$ZINIT_HOME"
fi
# Source/Load zinit
source "${ZINIT_HOME}/zinit.zsh"
# Add in Powerlevel10k
zinit ice depth=1; zinit light romkatv/powerlevel10k
# Add in zsh plugins
zinit light zsh-users/zsh-syntax-highlighting
zinit light zsh-users/zsh-completions
zinit light zsh-users/zsh-autosuggestions
zinit light Aloxaf/fzf-tab
# Add in snippits (ohmyzshell plugins)
zinit snippet OMZP::git
zinit snippet OMZP::sudo
zinit snippet OMZP::command-not-found
zinit snippet OMZP::colored-man-pages
zinit snippet OMZP::colorize
zinit snippet OMZP::hitchhiker
zinit snippet OMZP::rust
# https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/ssh-agent
#zinit snippet OMZP::ssh-agent
# https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/ssh
#zinit snippet OMZP::ssh
# Load ZSH Color Style
ZSH_COLORIZE_STYLE="colorful"
# Load zsh-completions
autoload -U compinit && compinit
zinit cdreplay -q
# Investigate zini plugin Starship.rs
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
# Preferred editor for local and remote sessions
if [[ -n $SSH_CONNECTION ]]; then
export EDITOR='vim'
else
export EDITOR='nvim'
fi
# Keybindings
bindkey -e
bindkey '^p' history-search-backward
bindkey '^n' history-search-forward
# command history
HISTSIZE=5000
HISTFILE=~/.zsh/.zsh_history
SAVEHIST=$HISTSIZE
HISTDUP=erase
setopt appendhistory
setopt sharehistory
setopt hist_ignore_space
setopt hist_ignore_all_dups
setopt hist_save_no_dups
setopt hist_ignore_dups
setopt hist_find_no_dups
# Completion styling
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}'
zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}"
zstyle ':completion:*' menu no
zstyle ':fzf-tab:complete:cd:*' fzf-preview 'ls --color $realpath'
#zstyle ':fzf-tab:complete:__zoxide_z:*' fzf-preview 'ls --color $realpath'
#zstyle ':omz:plugins:ssh-agent' quiet yes
#zstyle ':omz:plugins:ssh-agent' lazy yes
# Source/Load other files.
source ${HOME}/.zsh/.zshrc_aliases
# Shell integrations
eval "$(fzf --zsh)"
eval $(keychain --eval ~/.ssh/github.com)
#eval "$(zoxide init --cmd cd zsh)"
eval $HOME/bin/vfd
When you see that warning, what is the output of typeset -p P9K_STARTUP_CONSOLE_OUTPUT
?
OK, so I figured this out with your response. It was a combination of keychain and VFD (a local script of fortune from a specific file and then pipped to cowsay). I moved them to the top, and the problem appears to have resolved itself.
When you see that warning, what is the output of
typeset -p P9K_STARTUP_CONSOLE_OUTPUT
?
This would be a good diagnostic tool to list in the above error message to help diagnose a problem like this.
Wasn't there anything below the "-- console output produced during zsh initialization follows --"? I just assumed you cut out the important part when filing the issue.
No, it was just my prompt at that point. I figured my themed prompt wasn't necessary for the issue lol.
When you see that warning, what is the output of
typeset -p P9K_STARTUP_CONSOLE_OUTPUT
?
What is the answer to this question then?
'Keychain' and 'fortune' produced output at console initialization, which was producing the output interfering with the pl10k instant prompt, and moving these to before pl10k's instant prompt initialization resolved the problem.
When you see that warning, what is the output of
typeset -p P9K_STARTUP_CONSOLE_OUTPUT
?This would be a good diagnostic tool to list in the above error message to help diagnose a problem like this.
I'm trying to address this suggestion of yours. It would be a lot easier if you could answer my question.
I apologize; I misunderstood. The suggestion being 'typeset -p P9K_STARTUP_CONSOLE_OUTPUT' would be good to have printed in the pl10k instant prompt error message. This immediately allowed me to correct my issues and I thought this would be useful for others to self-diagnose.
No need to apologize.
I give up though.
I noticed over the last 2 days, while I was refining my .zshrc, that when I created new tmux windows or panes w/i tmux, that pl10k pukes all over my console with the following message,
If I open a new terminal window from my terminal client, that error message doesn't appear, and it doesn't appear the first time tmux is called to replace the already running shell. Is there something special that has to be done w/ either zsh or powerlevel10k that I am not aware of?