Comments (5)
Ah, great point, thanks. Your alternative way sounds like the way to go.
from argcomplete.
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.
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.
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.
Should be fixed in f4c3600 and released in v0.6.4. Please test.
from argcomplete.
Related Issues (20)
- new release on pypi HOT 2
- 2.0.5: test/ content is installed HOT 1
- 2.0.6: pytest is failing in two units HOT 9
- SuppressCompleter is not working HOT 2
- Make activate-global-python-argcomplete compatible with zsh HOT 1
- Deduplicate shell activator code
- Add zsh test suite HOT 2
- Clean up top level namespace
- Make and document completer class for typing HOT 1
- Expand completer protocol to provide descriptions HOT 1
- Emit completion scripts to registered locations automatically by default
- Use zsh-complist
- Recommended replacement for `split_line`? HOT 3
- test_console_script_module_wheel and test_console_script_package_wheel fail on Python 3.7 with importlib_metadata >= 5 HOT 8
- zsh tests failures on Gentoo HOT 2
- Linux Installation Issues and Insights HOT 3
- No completion running with `python script.py` HOT 6
- Missing /etc/bash_completion.d causes bad Linux install HOT 1
- ZSH Global Completion Issues on Ubuntu 22.04 HOT 2
- Python 3.7 Compatibility Issue with _check_console_script.py
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from argcomplete.