Git Product home page Git Product logo

Comments (5)

anki-code avatar anki-code commented on June 21, 2024 1

From another thread. Reported by guraltsev:

I am having the same exact problem and specifically with jq! I tried it with the python from msys2 with ucrt64 as well as with the standard windows python (3.11.7 and 3.12.1). In both cases jq hangs from the command:

echo "{\"a\":2}"  |  jq .

but works perfectly if one does

echo "{\"a\":2}"  > test
jq . test

Also, the same problem happens if one does

echo "{\"a\":2}"  > test
cat test | jq . 

However

tail test | jq .

works ok!

The problem, I believe, is that both cat and echo are xonsh commands while tail is a "true" executable.

The problem seems to lie in the piping logic of xonsh

from xonsh.

Spitfire1900 avatar Spitfire1900 commented on June 21, 2024

Not reproducing using Git for Windows.

XXXXXX ~ [1] @ where cat.exe
C:\Program Files\Git\usr\bin\cat.exe
XXXXXX ~ @ echo 'hello' | cat.exe
hello

from xonsh.

Spitfire1900 avatar Spitfire1900 commented on June 21, 2024

I've reproduced a hang on xonfig info -j | cat in Ubuntu 22.04.3

from xonsh.

Spitfire1900 avatar Spitfire1900 commented on June 21, 2024

The following seems to be a workaround

_ = $(xonfig info -j); echo @(_) | jq .

from xonsh.

anki-code avatar anki-code commented on June 21, 2024

Reported Awpteamoose:

history | grep foo outputs matches and then hangs on Windows, regardless of whether there actually were matches or not. I'm using wt.exe for terminal, xonsh --no-rc and GNU grep for Windows (in PATH). Other things like cat foo | grep bar work fine.

from xonsh.

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.