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

Option to make prompt 1 line #65

Closed
iamajvillalobos opened this issue Mar 30, 2018 · 12 comments · Fixed by #265
Closed

Option to make prompt 1 line #65

iamajvillalobos opened this issue Mar 30, 2018 · 12 comments · Fixed by #265
Assignees
Labels
❓discussion understanding the project and its choices 🙏 help wanted needs PR or help on decision ⭐️ idea feature request or suggestion

Comments

@iamajvillalobos
Copy link

Is it possible to have an option to be like this? https://github.com/DFurnes/purer.

@rafaelrinaldi
Copy link
Collaborator

This comes up quite often actually. As I said a few times here before I personally would like to always stick to the original pure theme since the main idea of this project is to be a 1:1 from zsh to fish. If this is an option on the official theme (can you please check?) we can definitely look into supporting it (PRs welcome) but if not I'd like to stay out of it.

@rafaelrinaldi rafaelrinaldi self-assigned this Jul 10, 2018
@iamajvillalobos
Copy link
Author

No :), I respect your decision still. Thank you for your efforts on this one. I'm closing this now.

@rafaelrinaldi
Copy link
Collaborator

Thank you for your suggestion. If you have anything else you would like to see in the project please feel free to open an issue.

@sholladay
Copy link

Hi @rafaelrinaldi, I found that the original Pure theme does in fact support this. Would you be willing to reconsider? I would like to at least try it out for a bit and see how it feels. A branch would be great, even if you don't want to publish it as part of an official release.

https://github.com/sindresorhus/pure/wiki#single-line-prompt

@edouard-lopez
Copy link
Member

I re-open this as it's indeed a feature of the zsh version.

Temporary Solution

You can test this by modifying fish_prompt.fish#L5 to not print newline, by adding a -n flag:

- echo -e (_pure_prompt_first_line) # print current path, git branch/status, command duration
+ echo -e -n (_pure_prompt_first_line) # print current path, git branch/status, command duration

Long-term Solution

  1. Add tests for required feature (can happen last if you are un-familiar with TDD) ;
  2. Create a flag in config/pure.fish, e.g. pure_enable_single_line_prompt (default to false) ;
  3. Alter the behavior in fish_prompt.fish#L5 based on flag (I prefer printf over echo for such thing) ;

@sholladay Would you be kind enough to submit a PR? You'll need

@edouard-lopez edouard-lopez reopened this Jan 7, 2019
@sholladay
Copy link

Yes, I will explore making a PR for this.

@rafaelrinaldi
Copy link
Collaborator

@sholladay Thanks for chiming in. I’d be more than happy to review a PR for this.

@edouard-lopez edouard-lopez added ❓discussion understanding the project and its choices ⭐️ idea feature request or suggestion 🙏 help wanted needs PR or help on decision labels Jan 9, 2019
@edouard-lopez edouard-lopez added this to the 2.x milestone Jan 12, 2019
@limakzi
Copy link

limakzi commented May 28, 2019

How can I support you with this ticket, @sholladay, @rafaelrinaldi?

@sholladay
Copy link

I still intend to submit a PR for this when time allows. It's kind of low on my list, though, so if you're on the fence about working on it, don't wait for me. :)

That said, if someone were able to tackle step 1 and make a failing test case, I could certainly get to it sooner.

@IlanCosman
Copy link

Hi, just wanted to mention that Tide can do this. Just run Tide's configuration wizard and select the Pure style.

Other advantages of Tide:

  • Significantly more configurable
  • Much faster (~4x) outside of git repos
  • Multi-line right prompt
  • Extensible

@NickHu
Copy link

NickHu commented Nov 5, 2020

Tide was quite buggy when I tried it so I'd still value someone adding this here

@edouard-lopez
Copy link
Member

edouard-lopez commented Dec 17, 2020

Zsh Pure put everything before the prompt symbol I'm going to implement it like this.

closes #217

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
❓discussion understanding the project and its choices 🙏 help wanted needs PR or help on decision ⭐️ idea feature request or suggestion
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants