Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add newline option "$'\n'" #9

Open
robellegate opened this issue Jan 30, 2021 · 1 comment
Open

Add newline option "$'\n'" #9

robellegate opened this issue Jan 30, 2021 · 1 comment

Comments

@robellegate
Copy link

Is your feature request related to a problem? Please describe.
It would be great if there were an option for adding a newline to your $PROMPT, as when I've tried to add it using custom text, it doesn't work.

Describe the solution you'd like
A button that adds the text "$'\n'" to split your $PROMPT across lines. This is how the Parrot Sec project does it for their .zshrc file in their /etc/skel directory:

PROMPT="%F{red}┌[%f%F{cyan}%m%f%F{red}]─[%f%F{yellow}%D{%H:%M-%d/%m}%f%F{red}]─[%f%F{magenta}%d%f%F{red}]%f"$'\n'"%F{red}└╼%f%F{green}$USER%f%F{yellow}$%f"

Describe alternatives you've considered
I don't think there are any other alternatives to do this, but let me know if someone has a better way to do it!

@snax08
Copy link

snax08 commented Aug 3, 2023

a good work around in the meantime until this feature gets added is to add a character you don't plan on using in place of the line break. Then when you go to add the generated code to your .zshrc replace the character with "$'\n'"

This comment was very helpful in helping me find this workaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants