~/.bash_completion.d/python-argcomplete.sh prevents other completions
See original GitHub issueI noticed a while ago that when I source the script python-argcomplete.sh
I cannot tab to complete environment variables. If I comment the last line in the script:
#complete -o default -D -F _python_argcomplete_global
Then I can do:
macbook-pro:~ jmlopez$ echo $PA<TAB>
macbook-pro:~ jmlopez$ echo $PATH
As soon as I activate the global completer then it doesn’t do the environment variable completion anymore. This behavior does not happen when registering an awesome script, i.e.
eval "$(register-python-argcomplete my-awesome-script.py)"
Not sure if this is happening with others, can someone check if this is bug on argparse? I’m using bash 4.2:
macbook-pro:~ jmlopez$ echo $BASH_VERSION
4.2.45(2)-release
Issue Analytics
- State:
- Created 10 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Bash completion from another completion - Stack Overflow
I have a script that requires as an argument the name of command and arguments of that command. So I want to write...
Read more >scop/bash-completion - GitHub
Programmable completion functions for bash. Contribute to scop/bash-completion development by creating an account on GitHub.
Read more >Bash completion appends a space after a word - how can I ...
This is the default behaviour for complete when a full match is found, to append a space and allow further typing into the...
Read more >Creating a bash completion script - iridakos
A tutorial for adding tab completion to your scripts using the Bash Programmable Completion functionality.
Read more >How to create a Bash completion script - Opensource.com
helping them know the available continuations to their commands; preventing errors and improving their experience by hiding or showing options ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I found some bash reference on
complete
and the-o
option got my attention:It seems that adding the
bashdefault
option fixes the problem:Now it completes the environment variables as well.
Sure. With pleasure!