V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
ton618
V2EX  ›  Linux

export PS1 不生效问题请教

  •  
  •   ton618 · Jun 7, 2024 · 1235 views
    This topic created in 689 days ago, the information mentioned may be changed or developed.

    在终端里执行:

    export PS1=">"
    echo $PS1
    [\[\033[0;37m\]\u@\H:\[\033[0m\] \[\033[01;36m\]\W\[\033[0m\]]\[\033[01;32m\]$\[\033[0m\]
    

    这是什么问题啊?为什么 PS1 无法被修改呢? export 其他的变量都没问题

    2 replies    2024-06-07 23:04:50 +08:00
    rayae
        1
    rayae  
       Jun 7, 2024
    试一下 unset PROMPT_COMMAND 再 export PS1
    ton618
        2
    ton618  
    OP
       Jun 7, 2024
    @rayae #1 我靠,牛逼~非常感谢🙏
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   946 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 21:16 · PVG 05:16 · LAX 14:16 · JFK 17:16
    ♥ Do have faith in what you're doing.