romkatv / powerlevel10k

A Zsh theme
MIT License
46.24k stars 2.18k forks source link

p10k config writes a wrong path to ```.zshrc``` #1171

Closed yasamnoya closed 3 years ago

yasamnoya commented 3 years ago

The last step of p10k config writes two lines to .zshrc

To customize prompt, run `p10k configure` or edit ~.p10k.zsh.
[[ ! -f ~.p10k.zsh ]] || source ~.p10k.zsh

Should the path be ~/.p10k.zsh instead of ~.p10k.zsh?

romkatv commented 3 years ago

How can I reproduce this? Which command do I need to run?

yasamnoya commented 3 years ago

Thanks for replying. I ran p10k configure, followed the instructions normally, and select y at the last step which asked me whether to apply the changes to ~/.zshrc. After that, the tool append those two lines to ~/.zshrc

romkatv commented 3 years ago

Please post the content of your ~/.zshrc and the output of the following command:

uname -a
yasamnoya commented 3 years ago

~/.zshrc:

# 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 to your oh-my-zsh installation.
export ZSH="/home/B10615023//.oh-my-zsh"
export editor="nvim"
export TERM=xterm-256color
export KEYTIMEOUT=1

ZSH_THEME="powerlevel10k/powerlevel10k"

#zsh-vim-mode config
#mode sensitive cursor
MODE_CURSOR_VIINS="blinking bar"
MODE_CURSOR_REPLACE="$MODE_CURSOR_VIINS"
MODE_CURSOR_VICMD="block"
MODE_CURSOR_SEARCH="steady underline"
MODE_CURSOR_VISUAL="$MODE_CURSOR_VICMD steady bar"
MODE_CURSOR_VLINE="$MODE_CURSOR_VISUAL"

plugins=(
        git
        zsh-autosuggestions
        zsh-syntax-highlighting
        zsh-vim-mode
                )

source $ZSH/oh-my-zsh.sh

alias zshconfig="vim ~/.zshrc"
alias ohmyzsh="vim ~/.oh-my-zsh"
alias python="python3"
alias vim="nvim"

eval $(thefuck --alias)

# To customize prompt, run `p10k configure` or edit ~.p10k.zsh.
[[ ! -f ~.p10k.zsh ]] || source ~.p10k.zsh

Output of uname -a:

Linux nlp 4.15.0-128-generic #131-Ubuntu SMP Wed Dec 9 06:57:35 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
romkatv commented 3 years ago

Thank you.

Please do the following:

  1. Run this command and post its output here:
    locale; _p9k_can_configure -q; typeset -pm '__p9k_zshrc|__p9k_zshrc_u|__p9k_zd|__p9k_zd_u|ZDOTDIR|__p9k_cfg_*|POWERLEVEL9K_CONFIG_FILE'
  2. Remove the last two lines from ~/.zshrc.
  3. Run p10k configure and go through the questions to the very end. Agree to modify zshrc when the wizard asks you.
  4. Post the content of ~/.zshrc here.
romkatv commented 3 years ago

Closing due to inactivity.