Git Product home page Git Product logo

Comments (10)

robobenklein avatar robobenklein commented on August 21, 2024

It's possible although async redraws might cause problems with the current codebase.

If the RPROMPT doesn't contain any async segments, then there shouldn't be any problem, but for async support to draw outside the current prompt line I'll need to do some thinking...

from zinc.

robobenklein avatar robobenklein commented on August 21, 2024

Here's the simple solution if you don't mind that the RPROMPT is it's own line in the scrollback:

https://asciinema.org/a/VTqEf7FztS2u4i64Ec332Hc4C

Had to add a NONRENDERABLE display mode that allows direct output to avoid getting some extra spaces: c9d7537

One issue is that ZSH still thinks that the rprompt would be obstructed when the line gets too long, but otherwise it works as intended.

from zinc.

robobenklein avatar robobenklein commented on August 21, 2024

If that's the solution you're looking for then I'll clean up the code, do docs, and put it into master.

from zinc.

fniessen avatar fniessen commented on August 21, 2024

Dear, it seems this is exactly what I want. In fact, as the RPROMPT gives info over the last command (exit code, duration, time when it stopped), it makes more sense, for me, to get it placed before the prompt.

However, can't do it like in your video:

prompt_zinc_setup rprompt-previous-line
returns:
ZINC: No such preset found in /cygdrive/d/Users/fni/.dotfiles/plugins/oh-my-zsh/custom/themes/zinc/presets/.

What am I doing wrong?

PS- I'm having a Zinc up-to-date (last commit 4281aa1, on 2019-04-02).

from zinc.

robobenklein avatar robobenklein commented on August 21, 2024

Sorry, I had only committed the preset to the dev branch so far, since it still had some bugs on some systems.

If you want, the preset is on the dev branch at https://github.com/robobenklein/zinc/blob/dev/presets/rprompt-previous-line.zincp.zsh

I haven't put it on master yet since on a RHEL system I have it seems to write-over the previous line for some reason...

from zinc.

robobenklein avatar robobenklein commented on August 21, 2024

prompt_zinc_setup rprompt-previous-line should now work with master.

from zinc.

fniessen avatar fniessen commented on August 21, 2024

Hello, it almost work. Yes, it's now on 2 lines; but there is one white triangle almost at the end of the second line.

Can show you a pic if needed.

PS - You're incredible, reacting so quickly to my messages! (Thanks a lot…)

from zinc.

robobenklein avatar robobenklein commented on August 21, 2024

image

Weird, I thought I fixed that... it still happens on the latest master?

from zinc.

fniessen avatar fniessen commented on August 21, 2024

image

seems alright now. Thanks!!!

PS- I do think the timestamp should be 0-padded, always (at least, by default).

from zinc.

robobenklein avatar robobenklein commented on August 21, 2024

About the timestamp, it's really just ZSH's prompt expansion where you can input your own strftime format for whatever you want: http://zsh.sourceforge.net/Doc/Release/Prompt-Expansion.html

To generate the strftime format: http://strftime.net/

(I think you'd want function zincs_time(){ REPLY="%D{%H:%M}" })

from zinc.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.