您尚未登录。

#1 2021-12-11 22:31:16

惆怅的阿坤
会员
注册时间: 2021-06-20
帖子: 9

打开终端后这么自动执行 “neofetch” 命令

我的终端用的是Konsole ,zsh ,寻找了很多方法 比如直接在 ~/.zsh 文件下进行添加 neofetch 命令  或者 source ~/.neofetchShow  路径会提示警告

警告如下

console output produced during zsh initialization follows

console output during zsh initialization detected

请问论坛的大神们是怎么解决这个问题的,这个警告一大长篇不太想无视、

离线

#2 2021-12-11 23:01:31

依云
会员
所在地: a.k.a. 百合仙子
注册时间: 2011-08-21
帖子: 8,430
个人网站

Re: 打开终端后这么自动执行 “neofetch” 命令

没遇到过。请贴具体信息。

离线

#3 2021-12-11 23:13:14

惆怅的阿坤
会员
注册时间: 2021-06-20
帖子: 9

Re: 打开终端后这么自动执行 “neofetch” 命令

依云 说:

没遇到过。请贴具体信息。

[WARNING]: Console output during zsh initialization detected.

When using Powerlevel10k with instant prompt, console output during zsh
initialization may indicate issues.

You can:

  - Recommended: Change ~/.zshrc so that it does not perform console I/O
    after the instant prompt preamble. See the link below for details.

    * You will not see this error message again.
    * Zsh will start quickly and prompt will update smoothly.

  - Suppress this warning either by running p10k configure or by manually
    defining the following parameter:

      typeset -g POWERLEVEL9K_INSTANT_PROMPT=quiet

    * You will not see this error message again.
    * Zsh will start quickly but prompt will jump down after initialization.

  - Disable instant prompt either by running p10k configure or by manually
    defining the following parameter:

      typeset -g POWERLEVEL9K_INSTANT_PROMPT=off

    * You will not see this error message again.
    * Zsh will start slowly.

  - Do nothing.

    * You will see this error message every time you start zsh.
    * Zsh will start quickly but prompt will jump down after initialization.

For details, see:
https://github.com/romkatv/powerlevel10 … ant-prompt

-- console output produced during zsh initialization follows --

离线

#4 2021-12-12 00:17:10

依云
会员
所在地: a.k.a. 百合仙子
注册时间: 2011-08-21
帖子: 8,430
个人网站

Re: 打开终端后这么自动执行 “neofetch” 命令

哦,原来是你的提示符报的,难怪我从来没有见到过呢。

离线

#5 2021-12-13 17:11:35

Noi-q
会员
注册时间: 2021-10-28
帖子: 8

Re: 打开终端后这么自动执行 “neofetch” 命令

vim .zshrc
加上这两句就可以了,报错是来自于zshrc脚本里面

typeset -g POWERLEVEL9K_INSTANT_PROMPT=quiet
typeset -g POWERLEVEL9K_INSTANT_PROMPT=off

至于打开终端自动执行neofetch命令,你可以参考下面的代码进行更改

# me='Noi'
# 
# toilet -f ascii12 $me --gay -t
# 
# hour=$(date +"%H")
# 
# 通过不同时间问候不同句子
# case $hour in
#     06|07|08)          message="\e[1;36m$me 早上好! 清晨的第一缕阳光送给你\e[0m"
#     ;;                 
#     09|10|11|12)       message="\e[1;32m$me 上午好! 快去吃饭吧!\e[0m"
#     ;;                 
#     13|14|15|16|17|18) message="\e[1;33m$me 下午好! 在干嘛呢?\e[0m"
#     ;;                  
#     18|19|20|21|22|23) message="\e[1;35m$me 晚上好! 夜里的风凉吗?\e[0m"
#     ;;                 
#     00|01|03|04|05)    message="\e[1;38m$me 凌晨了! 在忙什么呢?\e[0m"
#     ;;
# esac
# 
# cowsay 随机图像
# rand_cowsay_forture () {
#     local cowsay_list=(`cowsay -l | tail -n +2`);
#     local cowsay_picture=$[ $RANDOM % ${#cowsay_list[@]} ];
#     printf  $message | cowsay -f ${cowsay_list[$cowsay_picture]};
# }
# 
# # cowsay $message
# rand_cowsay_forture
#
# echo -e "\e[1;31m当前时间: $(date +"%Y-%m-%d %H:%M:%S" | toilet -f wideterm --gay -t)\e[0m" 
# for i in `seq 33`
#     printf '-' 
#     sleep 0.01;

# echo "\n"
# fortune
# echo "\n"

离线

#6 2021-12-18 19:14:42

惆怅的阿坤
会员
注册时间: 2021-06-20
帖子: 9

Re: 打开终端后这么自动执行 “neofetch” 命令

非常感谢,完美解决了

Noi-q 说:

vim .zshrc
加上这两句就可以了,报错是来自于zshrc脚本里面

typeset -g POWERLEVEL9K_INSTANT_PROMPT=quiet
typeset -g POWERLEVEL9K_INSTANT_PROMPT=off

至于打开终端自动执行neofetch命令,你可以参考下面的代码进行更改

# me='Noi'
# 
# toilet -f ascii12 $me --gay -t
# 
# hour=$(date +"%H")
# 
# 通过不同时间问候不同句子
# case $hour in
#     06|07|08)          message="\e[1;36m$me 早上好! 清晨的第一缕阳光送给你\e[0m"
#     ;;                 
#     09|10|11|12)       message="\e[1;32m$me 上午好! 快去吃饭吧!\e[0m"
#     ;;                 
#     13|14|15|16|17|18) message="\e[1;33m$me 下午好! 在干嘛呢?\e[0m"
#     ;;                  
#     18|19|20|21|22|23) message="\e[1;35m$me 晚上好! 夜里的风凉吗?\e[0m"
#     ;;                 
#     00|01|03|04|05)    message="\e[1;38m$me 凌晨了! 在忙什么呢?\e[0m"
#     ;;
# esac
# 
# cowsay 随机图像
# rand_cowsay_forture () {
#     local cowsay_list=(`cowsay -l | tail -n +2`);
#     local cowsay_picture=$[ $RANDOM % ${#cowsay_list[@]} ];
#     printf  $message | cowsay -f ${cowsay_list[$cowsay_picture]};
# }
# 
# # cowsay $message
# rand_cowsay_forture
#
# echo -e "\e[1;31m当前时间: $(date +"%Y-%m-%d %H:%M:%S" | toilet -f wideterm --gay -t)\e[0m" 
# for i in `seq 33`
#     printf '-' 
#     sleep 0.01;

# echo "\n"
# fortune
# echo "\n"

离线

页脚