Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
ton618
V2EX  ›  Linux

export PS1 不生效问题请教

  •  
  •   ton618 · Jun 7, 2024 · 1326 views
    This topic created in 732 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   ·   4335 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 00:08 · PVG 08:08 · LAX 17:08 · JFK 20:08
    ♥ Do have faith in what you're doing.