GithubHelp home page GithubHelp logo

Comments (10)

ka1amita avatar ka1amita commented on May 19, 2024 1

I experienced the same issue with cat > <newfile> and touch <newfile> in IntelliJ terminal when propted for the update.

Ok imediatelly after update

from ohmyzsh.

carlosala avatar carlosala commented on May 19, 2024

Hi! That's an unfortunate corner case. I think changing the way omz updates in vscode could be counterproductive for users that don't use the venv integration. Instead of using vscode python venv, you could try our python plugin or disable the whole upgrade system if the terminal where zsh is running is vscode, as follows (before sourcing oh-my-zsh.sh):

[[ $TERM_PROGRAM == vscode ]] && zstyle ':omz:update' mode disabled

from ohmyzsh.

marcospgp avatar marcospgp commented on May 19, 2024

Could a simple check for incoming input on shell startup suffice? I assume VSCode sends its command right away, faster than a human would, so a simple check for input before prompting user to update could solve the issue for VSCode and any other automated shell-creating programs that could interfere with ohmyzsh and have ohmyzsh interfere with them

from ohmyzsh.

carlosala avatar carlosala commented on May 19, 2024

The problem is that the input comes after the shell is initialized, that's why the first char gets cached by the update system.
If the input comes before the question, it already catches it and skips update.

from ohmyzsh.

marcospgp avatar marcospgp commented on May 19, 2024

what if the update prompt simply tells the user to run an update command and doesn't directly ask/listen for a y/n input?

from ohmyzsh.

carlosala avatar carlosala commented on May 19, 2024

You can choose that as well by setting the update mode reminder. You can read about it in the README!

from ohmyzsh.

marcospgp avatar marcospgp commented on May 19, 2024

But given the wide adoption of VSCode as an editor is there a chance we could make the case for having that as a default?

from ohmyzsh.

mcornella avatar mcornella commented on May 19, 2024

I think that's an idea in the short run, let's add the check ourselves, but ideally in the long run I'd like to have a better solution for delayed initial input.

from ohmyzsh.

mcornella avatar mcornella commented on May 19, 2024

I'm not able to reproduce this in VS Code (tried following [1] to no avail), and I don't have IntelliJ installed to reproduce this. Could you write a bullet point list of the steps to set this up, and confirm that you're in the latest OMZ version?

from ohmyzsh.

marcospgp avatar marcospgp commented on May 19, 2024

Why not just avoid capturing initial terminal output, which anecdotally conflicts with more than one application? I think a prompt that asks the user to run a command to update would work just as well in all instances, no?

Is there a big advantage in capturing input? Forcing the user to decide immediately whether they want to update (seems a bit intrusive)?

I appreciate all your effort here, just an idea of what I would do here 🙏

from ohmyzsh.

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.