Skip to content

Commit

Permalink
Update README.rst about PYTHON_ARGCOMPELTE_OK_PATHS
Browse files Browse the repository at this point in the history
  • Loading branch information
zwimer committed Dec 14, 2024
1 parent e7f5b90 commit dd5bcf4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ multiple Python versions on the same system, the version being used to run the s

.. note:: If you use setuptools/distribute ``scripts`` or ``entry_points`` directives to package your module,
argcomplete will follow the wrapper scripts to their destination and look for ``PYTHON_ARGCOMPLETE_OK`` in the
destination code, it will also check if the wrapper or wrapped scripts are defined in ``PYTHON_ARGCOMPLETE_OK_PATHS``.
destination code, it will also check if the wrapper is defined in ``PYTHON_ARGCOMPLETE_OK_PATHS``.

If you choose not to use global completion, or ship a completion module that depends on argcomplete, you must register
your script explicitly using ``eval "$(register-python-argcomplete my-python-app)"``. Standard completion module
Expand Down
2 changes: 1 addition & 1 deletion argcomplete/bash_completion.d/_python-argcomplete
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ __python_argcomplete_scan_head() {
local file="$1"
local target="$2"

local abspath="$(echo "$file" | sed -E "s|//+|/|g")"
local abspath="$(echo "$file" | sed -E "s|//+|/|g")"
if [[ "$target" == "magic_string" ]] && [[ ":${PYTHON_ARGCOMPLETE_OK_PATHS}:" == *":$abspath"* ]]; then
[[ "$regex" =~ $regex ]] # Put a match in BASH_REMATCH
__python_argcomplete_upshift_bash_rematch
Expand Down

0 comments on commit dd5bcf4

Please sign in to comment.