-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tab completion not working with conda 4.8.3 in Ubuntu 20.04 #9975
Comments
If it can be of help, I also tried to increase debugging with bash I opened a new terminal, typed luca@laptop:~$ eval "$(register-python-argcomplete conda)"
++ register-python-argcomplete conda
+ eval '
# Run something, muting output or redirecting it to the debug stream
# depending on the value of _ARC_DEBUG.
__python_argcomplete_run() {
if [[ -z "$_ARC_DEBUG" ]]; then
"$@" 8>&1 9>&2 1>/dev/null 2>&1
else
"$@" 8>&1 9>&2 1>&9 2>&1
fi
}
_python_argcomplete() {
local IFS=$'\''\013'\''
local SUPPRESS_SPACE=0
if compopt +o nospace 2> /dev/null; then
SUPPRESS_SPACE=1
fi
COMPREPLY=( $(IFS="$IFS" \
COMP_LINE="$COMP_LINE" \
COMP_POINT="$COMP_POINT" \
COMP_TYPE="$COMP_TYPE" \
_ARGCOMPLETE_COMP_WORDBREAKS="$COMP_WORDBREAKS" \
_ARGCOMPLETE=1 \
_ARGCOMPLETE_SUPPRESS_SPACE=$SUPPRESS_SPACE \
__python_argcomplete_run "$1") )
if [[ $? != 0 ]]; then
unset COMPREPLY
elif [[ $SUPPRESS_SPACE == 1 ]] && [[ "$COMPREPLY" =~ [=/:]$ ]]; then
compopt -o nospace
fi
}
complete -o nospace -o default -o bashdefault -F _python_argcomplete conda'
++ complete -o nospace -o default -o bashdefault -F _python_argcomplete conda And when I type luca@laptop:~$ conda ins+ local $'IFS=\v'
+ local SUPPRESS_SPACE=0
+ compopt +o nospace
+ SUPPRESS_SPACE=1
+ COMPREPLY=($(IFS="$IFS" COMP_LINE="$COMP_LINE" COMP_POINT="$COMP_POINT" COMP_TYPE="$COMP_TYPE" _ARGCOMPLETE_COMP_WORDBREAKS="$COMP_WORDBREAKS" _ARGCOMPLETE=1 _ARGCOMPLETE_SUPPRESS_SPACE=$SUPPRESS_SPACE __python_argcomplete_run "$1"))
++ IFS=$'\v'
++ COMP_LINE='conda ins'
++ COMP_POINT=9
++ COMP_TYPE=33
++ _ARGCOMPLETE_COMP_WORDBREAKS='
"'\''><=;|&(:'
++ _ARGCOMPLETE=1
++ _ARGCOMPLETE_SUPPRESS_SPACE=1
++ __python_argcomplete_run conda
++ [[ -z '' ]]
++ conda
+ [[ 0 != 0 ]]
+ [[ 1 == 1 ]]
+ [[ '' =~ [=/:]$ ]] |
I also did the same as above, but having activated conda base environment first. I opened a new terminal and run:
which displayed ++ register-python-argcomplete conda
+ eval '
# Run something, muting output or redirecting it to the debug stream
# depending on the value of _ARC_DEBUG.
__python_argcomplete_run() {
if [[ -z "$_ARC_DEBUG" ]]; then
"$@" 8>&1 9>&2 1>/dev/null 2>&1
else
"$@" 8>&1 9>&2 1>&9 2>&1
fi
}
_python_argcomplete() {
local IFS=$'\''\013'\''
local SUPPRESS_SPACE=0
if compopt +o nospace 2> /dev/null; then
SUPPRESS_SPACE=1
fi
COMPREPLY=( $(IFS="$IFS" \
COMP_LINE="$COMP_LINE" \
COMP_POINT="$COMP_POINT" \
COMP_TYPE="$COMP_TYPE" \
_ARGCOMPLETE_COMP_WORDBREAKS="$COMP_WORDBREAKS" \
_ARGCOMPLETE=1 \
_ARGCOMPLETE_SUPPRESS_SPACE=$SUPPRESS_SPACE \
__python_argcomplete_run "$1") )
if [[ $? != 0 ]]; then
unset COMPREPLY
elif [[ $SUPPRESS_SPACE == 1 ]] && [[ "$COMPREPLY" =~ [=/:]$ ]]; then
compopt -o nospace
fi
}
complete -o nospace -o default -o bashdefault -F _python_argcomplete conda'
++ complete -o nospace -o default -o bashdefault -F _python_argcomplete conda (it looks the same to me) and then I typed conda ins+ local $'IFS=\v'
+ local SUPPRESS_SPACE=0
+ compopt +o nospace
+ SUPPRESS_SPACE=1
+ COMPREPLY=($(IFS="$IFS" COMP_LINE="$COMP_LINE" COMP_POINT="$COMP_POINT" COMP_TYPE="$COMP_TYPE" _ARGCOMPLETE_COMP_WORDBREAKS="$COMP_WORDBREAKS" _ARGCOMPLETE=1 _ARGCOMPLETE_SUPPRESS_SPACE=$SUPPRESS_SPACE __python_argcomplete_run "$1"))
++ IFS=$'\v'
++ COMP_LINE='conda ins'
++ COMP_POINT=9
++ COMP_TYPE=33
++ _ARGCOMPLETE_COMP_WORDBREAKS='
"'\''><=;|&(:'
++ _ARGCOMPLETE=1
++ _ARGCOMPLETE_SUPPRESS_SPACE=1
++ __python_argcomplete_run conda
++ [[ -z '' ]]
++ conda
+ [[ 0 != 0 ]]
+ [[ 1 == 1 ]]
+ [[ '' =~ [=/:]$ ]] which again looks the same output as before to me (even though now the base environment is active) |
I'm experiencing at the same problem. There appears to be a solution on #9178 |
Hi there, thank you for your contribution! This issue has been automatically marked as stale because it has not had recent activity. It will be closed automatically if no further activity occurs. If you would like this issue to remain open please:
NOTE: If this issue was closed prematurely, please leave a comment. Thanks! |
For those having this issue, consider looking at https://github.com/tartansandal/conda-bash-completion |
I'm submitting a...
Current Behavior
I followed the steps at https://docs.conda.io/projects/conda/en/latest/user-guide/configuration/enable-tab-completion.html to enable bash tab completion in Ubuntu 20.04.
When I write
conda ins
and hit tab nothing happens(I also tried to log out and login)
Because I suspected that the issue could be caused by setting
auto_activate_base: False
I have tried to activate conda's base environment withconda activate base
and run manually in the shell
eval "$(register-python-argcomplete conda)"
but even like so tab completion doesn't work.
Note that for other tools using the same mechanism for tab completion e.g. pipx (https://pypi.org/project/pipx/) I have no issues.
For example, in .bashrc file I have
and completions works fine for pipx.
Steps to Reproduce
Follow the steps at https://docs.conda.io/projects/conda/en/latest/user-guide/configuration/enable-tab-completion.html
in an Ubuntu 20.04 machine
Expected Behavior
I expect the command to be completed upon hitting TAB.
Environment Information
`conda info`
`conda config --show-sources`
`conda list --show-channel-urls`
The text was updated successfully, but these errors were encountered: