mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2026-01-22 22:45:37 +01:00
follow ~/.zshrc and ~/.p10k.zsh symlinks
When the user tells the configuration wizard to apply changes to ~/.zshrc and ~/.p10k.zsh and these files are symlinks, apply changes to the targets. see #426
This commit is contained in:
parent
0a484d1d99
commit
e374395746
2 changed files with 6 additions and 5 deletions
|
|
@ -1410,12 +1410,12 @@ function ask_zshrc_edit() {
|
|||
if [[ -e $__p9k_zshrc ]]; then
|
||||
zshrc_content="$(<$__p9k_zshrc)" || quit -c
|
||||
local lines=(${(f)zshrc_content})
|
||||
local f0=$__p9k_cfg_path
|
||||
local f0=$__p9k_cfg_path_o
|
||||
local f1=${(q)f0}
|
||||
local f2=${(q-)f0}
|
||||
local f3=${(qq)f0}
|
||||
local f4=${(qqq)f0}
|
||||
local g1=${${(q)__p9k_cfg_path}/#(#b)${(q)HOME}\//'~/'}
|
||||
local g1=${${(q)__p9k_cfg_path_o}/#(#b)${(q)HOME}\//'~/'}
|
||||
if [[ -n ${(@M)lines:#(#b)[^#]#([^[:IDENT:]]|)source[[:space:]]##($f1|$f2|$f3|$f4|$g1)(|[[:space:]]*|'#'*)} ]]; then
|
||||
zshrc_has_cfg=1
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue