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

right prompt #237

Closed
scopatz opened this issue Feb 12, 2016 · 10 comments
Closed

right prompt #237

scopatz opened this issue Feb 12, 2016 · 10 comments

Comments

@scopatz
Copy link
Contributor

scopatz commented Feb 12, 2016

This is a feature request that we got over at xonsh/xonsh#674 that I thought I would pass along. Apparently, zsh and others have an "RPROMPT" or right prompt ability. I realize that this may be out of scope, but we'd certainly use it in xonsh if PTK supported it. Maybe @arkhan can add more?

@jonathanslenders
Copy link
Member

Hi @scopatz, @arkhan,

Prompt-toolkit doesn't support this RPROMPT yet, but we can definitely implement that. It's an interesting feature.

I just tried RPROMPT in zsh, and it seems that it is hidden when the text flows over it. Is that what you would expect?

We can probably implement that in the default layout from prompt_toolkit.shortcuts by adding a right aligned float. One that is only displayed if the underlying region is still empty.

Are there any other variations to this RPROMPT, known in other shells? Maybe we need a more generic, universal solution, that is more flexible than what I currently have in mind.

Jonathan

@scopatz
Copy link
Contributor Author

scopatz commented Feb 12, 2016

Hi @jonathanslenders RPROPMT is totally new to me. The first I have heard of it has been from @arkhan. I agree that the implementation is way easier if you allow it to be overwritten when the input becomes too long. Is this what you were expecting @arkhan?

@arkhan
Copy link

arkhan commented Feb 12, 2016

if the idea is to have separate prompt, left and right

@jonathanslenders
Copy link
Member

Hi all, rprompt has been added to prompt-toolkit. It's commited to the master branch.
Can you have a look at this commit a666010 and see whether that is what you expect?

@arkhan
Copy link

arkhan commented Feb 15, 2016

cool, but how to instegrate in xonsh...?

@scopatz
Copy link
Contributor Author

scopatz commented Feb 15, 2016

Thanks @jonathanslenders! @arkhan this is something that will need to be changed in xonsh.ptk.shell Please feel free to open up a PR to xonsh for this, otherwise it will have to wait for someone else to get to it. Thanks!

@scopatz
Copy link
Contributor Author

scopatz commented Feb 21, 2016

@jonathanslenders I have now implemented what I believe are the correct hooks in xonsh/xonsh#696

@scopatz
Copy link
Contributor Author

scopatz commented Feb 21, 2016

Thanks again!

@arkhan
Copy link

arkhan commented Feb 21, 2016

+1

@jonathanslenders
Copy link
Member

Ok, closing this. A new release should follow one of these days.

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

No branches or pull requests

3 participants