When I was editing .zshrc, the command line became long and disturbing.

Asked 2 years ago, Updated 2 years ago, 410 views

When I was editing .zshrc, the command line became long and disturbing.
How can I undo it?

\[\e]0;\u@\h:\w\a\]${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$

zsh

2022-09-30 21:55

2 Answers

US>At the command line prompt? If you manually type PS1=$, the prompt will be shorter for that shell only.If you want to shorten the shell that you are launching in the future, find the line that sets the environment variable PS1 in ~/.zshrc and re-edit it.


2022-09-30 21:55

In /etc/zshrc, the default for the PROMPT variable is set as follows, so
Try re-editing ~/.zshrc using this as an example.

#Set prompts
PROMPT='[%n@%m]% to %#'#default prompt


2022-09-30 21:55

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.