Giter Club home page Giter Club logo

Comments (5)

kislyuk avatar kislyuk commented on July 18, 2024

Ah, great point, thanks. Your alternative way sounds like the way to go.

from argcomplete.

kislyuk avatar kislyuk commented on July 18, 2024

OK, I'm confused. I admit that I don't know precisely how fd management works in bash. From reading http://www.tldp.org/LDP/abs/html/io-redirection.html, the only conclusion I have been able to make so far is that "9>&2" in https://github.com/kislyuk/argcomplete/blob/master/argcomplete/bash_completion.d/python-argcomplete.sh#L31 does cause bash to reserve fd 9, by connecting it to fd 2, which is already open.

Could you help me understand what I need to do to make sure fd 9 is reserved correctly?

from argcomplete.

skelterjohn avatar skelterjohn commented on July 18, 2024

The time when it came up is actually when not autocompleting. My advice
was off, sorry!

The problem was because importing argcomplete causes it to try and open
that descriptor whether autocomplete() is called or not.

I fixed it locally by having it use stderr whenever _ARGCOMPLETE is not
set.
On Dec 14, 2013 4:06 PM, "Andrey Kislyuk" [email protected] wrote:

OK, I'm confused. I'm a bash n00b so I don't know precisely how fd
management works in bash. From reading
http://www.tldp.org/LDP/abs/html/io-redirection.html, the only conclusion
I have been able to make so far is that "9>&2" in
https://github.com/kislyuk/argcomplete/blob/master/argcomplete/bash_completion.d/python-argcomplete.sh#L31
does cause bash to reserve fd 9, by connecting it to fd 2, which is
already open.

Could you help me understand what I need to do to make sure fd 9 is
reserved correctly?


Reply to this email directly or view it on GitHubhttps://github.com//issues/66#issuecomment-30588687
.

from argcomplete.

kislyuk avatar kislyuk commented on July 18, 2024

Aha! Thanks for the clarification. The bug is something different, but just as severe: it shouldn't open any fds when imported. I'll fix that asap.

from argcomplete.

kislyuk avatar kislyuk commented on July 18, 2024

Should be fixed in f4c3600 and released in v0.6.4. Please test.

from argcomplete.

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.