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

export PS1 不生效问题请教

  •  
  •   ton618 · Jun 7, 2024 · 1663 views
    This topic created in 880 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
    rayae
    Jun 7, 2024
    1
    试一下 unset PROMPT_COMMAND 再 export PS1
    ton618
    ton618
    OP
    Jun 7, 2024
    2
    @rayae #1 我靠,牛逼~非常感谢🙏
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1418 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 23ms · UTC 18:50 · PVG 02:50 · LAX 10:50 · JFK 13:50
    ♥ Do have faith in what you're doing.