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 before prompt only when previous output exists #419

Closed
wants to merge 3 commits into from

Conversation

CalaW
Copy link

@CalaW CalaW commented Jul 4, 2023

Description

As #327 described, a newline is printed when there is no previous output. With this PR, the newline is omitted when the terminal is first opened or cleared using Ctrl-L.

Referred to the implementation from pure-fish, specifically in the files _pure_prompt_new_line.fish and _pure_init.fish.

BTW, feel free to squash commits when merging!

Motivation and Context

Closes #327

Screenshots (if appropriate)

How Has This Been Tested

  • I have tested using Linux.
  • I have tested using MacOS.

Checklist

  • I am ready to update the wiki accordingly.
  • I have updated the tests accordingly.

@CalaW CalaW requested a review from IlanCosman as a code owner July 4, 2023 10:51
@IlanCosman
Copy link
Owner

This does not work. The line you changed doesn't do what you think it does. The prompt is cached, so we'd need to check for the variable in every prompt run. I am still undecided if I want to do this. Thanks for trying to help tho :)

@IlanCosman IlanCosman closed this Jul 6, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add newline before prompt only when previous output exists
2 participants