You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We ran into a potential issue when deciding whether we want to recommend local (register-python-argcomplete) or global (activate-global-python-argcomplete) activation to users of our software. We thought local activation would be less intrusive but then ran into a case where this is not the case: we want to enable completion for our build tool called build.py. Obviously this is a common name, so chances are that there are other scripts like this around, for example older branches of our software that don't yet have the argcomplete code, or build scripts of other tools.
With global activation this is no problem: only scripts that have the magic string are called when a users presses TAB. With local activation, pressing TAB on a different script would start a build. This is not showing output, so from a user perspective, the call just blocks, but there are side effects happening in the background.
Would it be an option to consider PYTHON_ARGCOMPLETE_OK with the local activation as well, so only run the program if the magic string is found in it? Maybe with a flag of register-python-argcomplete if this should not be the default behavior.
This may be a separate issue but we also saw some differences between the two activation methods: with global activation zsh would suggest filenames in addition to the suggestions returned by the completers. As far as I know this was an issue that has already been fixed and I only saw it because I'm stuck on an old version from apt. The reason I'm mentioning this here is that I think in general it would be great if the behavior of the two activation methods could be unified, so they share more code and behavior. I don't know the internal details of this, of course, there could be reasons why this is not possible.
The text was updated successfully, but these errors were encountered:
We ran into a potential issue when deciding whether we want to recommend local (
register-python-argcomplete
) or global (activate-global-python-argcomplete
) activation to users of our software. We thought local activation would be less intrusive but then ran into a case where this is not the case: we want to enable completion for our build tool calledbuild.py
. Obviously this is a common name, so chances are that there are other scripts like this around, for example older branches of our software that don't yet have the argcomplete code, or build scripts of other tools.With global activation this is no problem: only scripts that have the magic string are called when a users presses TAB. With local activation, pressing TAB on a different script would start a build. This is not showing output, so from a user perspective, the call just blocks, but there are side effects happening in the background.
Would it be an option to consider
PYTHON_ARGCOMPLETE_OK
with the local activation as well, so only run the program if the magic string is found in it? Maybe with a flag ofregister-python-argcomplete
if this should not be the default behavior.This may be a separate issue but we also saw some differences between the two activation methods: with global activation zsh would suggest filenames in addition to the suggestions returned by the completers. As far as I know this was an issue that has already been fixed and I only saw it because I'm stuck on an old version from apt. The reason I'm mentioning this here is that I think in general it would be great if the behavior of the two activation methods could be unified, so they share more code and behavior. I don't know the internal details of this, of course, there could be reasons why this is not possible.
The text was updated successfully, but these errors were encountered: