我刚安装了Warp终端,我很喜欢它。
但是我想用星舰定制提示符,在我的Powerlevel10k终端上还有iTerm2。是可定位的吗?
发布于 2022-11-20 20:03:10
几个小时后,我成功地在经纬上安装了星舰,还让Powerlevel10k在iTerm上(以及所有其他终端)修改我的.zshrc
文件,就像翘曲文献说的那样。
因此,在文件开始时,我包装了Powelevel10k初始化,以便只在终端没有翘曲时激活它:
# 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 [[ $TERM_PROGRAM != "WarpTerminal" ]]; then
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
fi
我只在文件的末尾包装了星际飞船的初始化:
if [[ $TERM_PROGRAM == "WarpTerminal" ]]; then
eval "$(starship init zsh)"
fi
https://stackoverflow.com/questions/74469989
复制相似问题