怎样將linux terminal 改成右邊有時間顯示
高洛峰
高洛峰 2017-04-17 16:39:42
0
3
327

我在實驗樓看到terminal的右方有時間顯示如下,請問是怎样做到.

似乎不是設定$PS1的.

高洛峰
高洛峰

拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...

reply all(3)
迷茫

Bash

if [[ "$SHELL" == "/bin/bash" ]]; then
    # export PS1="\u@\H \l \w\n"
    export PS1="\[3[38;5;11m\]\u\[$(tput sgr0)\]\[3[38;5;15m\]@\h:\[$(tput sgr0)\]\[3[38;5;6m\][\w]\[$(tput sgr0)\]\[3[38;5;15m\] \[$(tput sgr0)\]\[3[38;5;2m\]\@\[$(tput sgr0)\]\[3[38;5;15m\]\n\[$(tput sgr0)\]"
fi
小葫芦

Looked at the terminal in the laboratory building. . . Using zsh. The prompt parsing method is different from bash.

洪涛

If you are using zsh, you can modify the theme configuration in ~/.zshrc. Put

ZSH_THEME="candy"

Just modify it to the theme you like. Many themes have time display. The built-in zsh theme can be found here.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!