Code Monkey home page Code Monkey logo

Comments (12)

jedahan avatar jedahan commented on July 22, 2024 1

Is this still an issue? I tried GEOMETRY_INFO=() and works as intended, I believe.

from geometry.

jedahan avatar jedahan commented on July 22, 2024

I would advise migrating to the mnml branch of geometry, and seeing if this issue persists. If it does let's figure out how to get the behaviour you'd prefer.

I think I would prefer it to be consistent (within sudo) and always show @hostname over remote. If that is not possible, we can come up with more creative solutions.

from geometry.

myyc avatar myyc commented on July 22, 2024

now the hostname seems gone but weirdly it isn't as it appears on the line above as i press enter (and enter doesn't insert a double newline)

image

from geometry.

alxbl avatar alxbl commented on July 22, 2024

That means geometry_hostname is in your GEOMETRY_INFO prompt, That's a default IIRC, If you don't want to use the INFO prompt (when you press enter without submitting a command) You can set GEOMETRY_INFO=() in your zshrc.

from geometry.

myyc avatar myyc commented on July 22, 2024

it seems like a bug? it only appears above and there is no double newline? compare here
image

from geometry.

alxbl avatar alxbl commented on July 22, 2024

That is how GEOMETRY_INFO works as far as I know.

This prompt didn't exist in the 1.x release, you can remove the default functions by explicitly setting GEOMETRY_INFO=() in your zshrc. This will prevent having anything print when you submit an empty command line.

I suppose we could modify the behavior so that GEOMETRY_INFO runs on a ZSH hook like precmd to have it display on its own line, but my understanding is that it was designed this way. I'll let @jedahan have the final word on this.

from geometry.

jedahan avatar jedahan commented on July 22, 2024

Its not a bug, but I am open to changing the design. I can see arguments for and against the current design, and even different behaviours. I personally like that there is no 'second line output' as it shows this is not just running a regular command, but can see how that might be confusing or weird.

from geometry.

myyc avatar myyc commented on July 22, 2024

i think it's a matter of preference and being accustomed (or not) to shell "themes" that have the option to insert a new line. if that is a thing then you open pandora's box of "when to do that" and "what happens if you do / don't", which personally i find a source of inconsistency but others might disagree. i'll try this later and come back with an answer. sorry for the delay :)

from geometry.

alxbl avatar alxbl commented on July 22, 2024

I think the newline feature could be implemented as an additional function which just adds a precmd hook. This would allow people who want newlines to have them without changing the default behavior.

For the GEOMETRY_INFO prompt itself, I don't think we should change the behavior, but we could probably make it configurable. I admit I don't use the INFO prompt much, and I was initially surprised by the default functions because I tend to hit enter to "scroll up".

from geometry.

myyc avatar myyc commented on July 22, 2024

That is how GEOMETRY_INFO works as far as I know.

This prompt didn't exist in the 1.x release, you can remove the default functions by explicitly setting GEOMETRY_INFO=() in your zshrc. This will prevent having anything print when you submit an empty command line.

trying this removes the hostname, but no double newline. how is this not inconsistent with not being logged in to any machine and having a double newline instead?

from geometry.

jedahan avatar jedahan commented on July 22, 2024

I think it’s a good idea to check if the array is empty or null and skip our custom logic if so.

from geometry.

mmathys avatar mmathys commented on July 22, 2024

@jedahan Worked for me with GEOMETRY_INFO, but found the behavior confusing as well.

from geometry.

Related Issues (20)

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.