-
Notifications
You must be signed in to change notification settings - Fork 423
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 a newline if the prompt is too long #599
Comments
I'm assuming that that type of expansion doesn't work because we set the You could try enabling it yourself and seeing if it will then expand this option. I like this idea though, and want to see it added as a feature. This means we couldn't rely on zsh specific things obviously. |
I tried this in my liquidprompt=$HOME/software/liquidprompt/liquidprompt
[[ -f $liquidprompt ]] && source $liquidprompt
# see https://github.com/nojhan/liquidprompt/issues/599
setopt promptsubst
export LP_PS1_POSTFIX=$'%-30(l:\n> :)' ...but still not working. Well, I'll wait... |
Add new setting LP_MINIMUM_CMD_LENGTH, which controls when a newline is added. See feature request liquidprompt#599.
Add new setting LP_MINIMUM_CMD_LENGTH, which controls when a newline is added. See feature request liquidprompt#599.
Add new setting LP_MINIMUM_SPACE_AFTER_PROMPT. A new line is added when the prompt would leave less space than this in the terminal. See feature request liquidprompt#599.
Add new setting LP_MINIMUM_SPACE_AFTER_PROMPT. A new line is added when the prompt would leave less space than this in the terminal. See feature request liquidprompt#599.
Add new setting LP_MINIMUM_SPACE_AFTER_PROMPT. A new line is added when the prompt would leave less space than this in the terminal. See feature request liquidprompt#599.
Add new setting LP_MINIMUM_SPACE_AFTER_PROMPT. A new line is added when the prompt would leave less space than this in the terminal. See feature request liquidprompt#599.
Add new setting LP_MINIMUM_SPACE_AFTER_PROMPT. A new line is added when the prompt would leave less space than this in the terminal. See feature request liquidprompt#599.
What are your ideas about the following options for generalizing @PandaWill's idea?
|
I really like your second idea. I have another one: Unfortunately I think that is beyond the possibility of the Liquid Prompt engine... I think something like 2 could be possible, if not very complicated... |
Shell: zsh
Operating system: linux Ubuntu 18.04
Liquid Prompt version (tag, commit): 5f4aeec
I am trying to add a newline to the prompt only if the characters left are less than, say, 30. In plain
zsh
you can use the %-30 prompt directive, so I tried...but it is doing nothing. Is there a correct way to do this?
Thanks for the nice software!
The text was updated successfully, but these errors were encountered: