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

prompt adds a new line after initialization #8

Closed
musm opened this issue Apr 5, 2019 · 6 comments
Closed

prompt adds a new line after initialization #8

musm opened this issue Apr 5, 2019 · 6 comments

Comments

@musm
Copy link
Contributor

musm commented Apr 5, 2019

When starting powershell or pwsh with this prompt it ends up adding a new line at initialization.

I.e.

$ pwsh -NoLogo

<pure prompt> # additional new line is inserted above
$ pwsh -NoLogo
<normal prompt> # no new line above
@nickcox
Copy link
Owner

nickcox commented Apr 6, 2019

This is as per the pure behaviour, I think.

Does this only bother you at startup or would you prefer never to see a newline before the prompt?

@musm
Copy link
Contributor Author

musm commented Apr 8, 2019

Yes it's very annoying. Especially when pwsh is used in other applications such as vscode. Thanks for the prompt responses @nickcox

@musm
Copy link
Contributor Author

musm commented Apr 8, 2019

As a short term solution I just removed `n in https://github.com/nickcox/pure-pwsh/blob/master/pure-pwsh/prompt.ps1#L31

@nickcox
Copy link
Owner

nickcox commented Apr 8, 2019

Yeah, I think the newlines should be part of $pure.prePrompt to make it easier to customise.

@nickcox
Copy link
Owner

nickcox commented Apr 9, 2019

This is published as 0.6.0. You can remove either of the newlines from the default PrePrompt of:

{param ($cwd, $git, $slow) "`n$cwd $git $slow"`n}

I think special-casing the initialisation of a new prompt is probably not worth it though.

@musm
Copy link
Contributor Author

musm commented Apr 9, 2019

Works well, thanks

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