diff --git a/news/fix_pip_completer.rst b/news/fix_pip_completer.rst
new file mode 100644
index 00000000..a290c4be
--- /dev/null
+++ b/news/fix_pip_completer.rst
@@ -0,0 +1,24 @@
+**Added:**
+
+* <news item>
+
+**Changed:**
+
+* <news item>
+
+**Deprecated:**
+
+* <news item>
+
+**Removed:**
+
+* <news item>
+
+**Fixed:**
+
+* ``pip`` completer no longer fires when ``pip`` happens to appear within a word
+  like ``bagpipes``
+
+**Security:**
+
+* <news item>
diff --git a/xonsh/completers/pip.py b/xonsh/completers/pip.py
index b80acb97..179689ee 100644
--- a/xonsh/completers/pip.py
+++ b/xonsh/completers/pip.py
@@ -9,12 +9,12 @@ import xonsh.lazyasd as xl
 
 @xl.lazyobject
 def PIP_RE():
-    return re.compile(r"pip(?:\d|\.)*")
+    return re.compile(r"\bx?pip(?:\d|\.)*")
 
 
 @xl.lazyobject
 def PIP_LIST_RE():
-    return re.compile(r"pip(?:\d|\.)* (?:uninstall|show)")
+    return re.compile(r"\bx?pip(?:\d|\.)* (?:uninstall|show)")
 
 
 @xl.lazyobject

Pip completer sneaks into cd when directory name contains 'pip'
## Expected Behavior
When triggering autocompletion in a `cd` command to enter a subdirectory of a directory containing 'pip', it should complete the subdirectory name. 

## Current Behavior
Instead, I get suggestions for `pip` subcommands like freeze, config, download, etc.

## Steps to Reproduce
Starting from a clean directory and an empty .xonshrc:
```
mkdir bagpipes
mkdir bagpipes/subdir
cd bagpipes/su[press tab here]
```
When tab is pressed in the above command, xonsh will not complete 'su' to 'subdir', but instead suggest pip subdommands.

## Workaround
Transposing the completers for `cd` and `pip` in the completer list fixes this specific issue, but it would not fix the similar issue of trying to complete another bash command, such as `ls bagpipes/su[press tab here]`. I haven't tried but assume that placing the pip completer after the bash completer would fix that too, although the proper fix seems to be making the pip completer not trigger when it shouldn't.

(For newbies like myself, you can transpose the completers by:

 ```
pip_completer = __xonsh__.completers['pip']
completer remove pip
completer add pip pip_completer ">cd"

diff --git a/tests/completers/test_pip_completer.py b/tests/completers/test_pip_completer.py
new file mode 100644
index 00000000..506464ab
--- /dev/null
+++ b/tests/completers/test_pip_completer.py
@@ -0,0 +1,39 @@
+import pytest
+from xonsh.completers.pip import PIP_RE, PIP_LIST_RE
+
+
+@pytest.mark.parametrize(
+    "line", ["pip", "xpip search", "$(pip", "![pip", "$[pip", "!(xpip"]
+)
+def test_pip_re(line):
+    assert PIP_RE.search(line)
+
+
+@pytest.mark.parametrize(
+    "line",
+    [
+        "pip show",
+        "xpip uninstall",
+        "$(pip show",
+        "![pip uninstall",
+        "$[pip show",
+        "!(xpip uninstall",
+    ],
+)
+def test_pip_list_re(line):
+    assert PIP_LIST_RE.search(line)
+
+
+@pytest.mark.parametrize(
+    "line",
+    [
+        "bagpipes show",
+        "toxbagpip uninstall",
+        "$(tompippery show",
+        "![thewholepipandpaboodle uninstall",
+        "$[littlebopip show",
+        "!(boxpip uninstall",
+    ],
+)
+def test_pip_list_re(line):
+    assert PIP_RE.search(line) is None

pip install -e .[dev]
parse_log_pytest
requirements.txt
pytest pytest-flake8 pytest-cov
apt-get update apt-get install -y gcc
3.7
requirements-docs.txt requirements-tests.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
alabaster==0.7.13
Babel==2.14.0
certifi @ file:///croot/certifi_1671487769961/work/certifi
cffi==1.15.1
charset-normalizer==3.4.1
cloud-sptheme==1.10.1.post20200504175005
codecov==2.1.13
coverage==7.2.7
cryptography==44.0.2
cycler==0.11.0
doctr==1.9.0
docutils==0.19
exceptiongroup==1.2.2
flake8==3.9.2
fonttools==4.38.0
idna==3.10
imagesize==1.4.1
importlib-metadata==6.7.0
iniconfig==2.0.0
Jinja2==3.1.6
kiwisolver==1.4.5
MarkupSafe==2.1.5
matplotlib==3.5.3
mccabe==0.6.1
numpy==1.21.6
numpydoc==1.5.0
packaging==24.0
Pillow==9.5.0
pluggy==1.2.0
prompt_toolkit==3.0.48
psutil==7.0.0
py==1.11.0
pycodestyle==2.7.0
pycparser==2.21
pyflakes==2.3.1
Pygments==2.17.2
pyparsing==3.1.4
pytest==7.4.4
pytest-cov==4.1.0
pytest-flake8==1.1.0
pytest-timeout==2.3.1
python-dateutil==2.9.0.post0
pytz==2025.2
PyYAML==6.0.1
pyzmq==26.2.1
requests==2.31.0
six==1.17.0
snowballstemmer==2.2.0
Sphinx==5.3.0
sphinxcontrib-applehelp==1.0.2
sphinxcontrib-devhelp==1.0.2
sphinxcontrib-htmlhelp==2.0.0
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.5
tomli==2.0.1
tornado==6.2
typing_extensions==4.7.1
urllib3==2.0.7
wcwidth==0.2.13
-e git+https://github.com/xonsh/xonsh.git@8c6fc1332d66a4a730f5fff06fa642fa8fb4e9ce#egg=xonsh
zipp==3.15.0

name: xonsh
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2022.12.7=py37h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.4.4=h6a678d5_1
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - pip=22.3.1=py37h06a4308_0
  - python=3.7.16=h7a1cb2a_0
  - readline=8.2=h5eee18b_0
  - setuptools=65.6.3=py37h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - wheel=0.38.4=py37h06a4308_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - alabaster==0.7.13
      - babel==2.14.0
      - cffi==1.15.1
      - charset-normalizer==3.4.1
      - cloud-sptheme==1.10.1.post20200504175005
      - codecov==2.1.13
      - coverage==7.2.7
      - cryptography==44.0.2
      - cycler==0.11.0
      - doctr==1.9.0
      - docutils==0.19
      - exceptiongroup==1.2.2
      - flake8==3.9.2
      - fonttools==4.38.0
      - idna==3.10
      - imagesize==1.4.1
      - importlib-metadata==6.7.0
      - iniconfig==2.0.0
      - jinja2==3.1.6
      - kiwisolver==1.4.5
      - markupsafe==2.1.5
      - matplotlib==3.5.3
      - mccabe==0.6.1
      - numpy==1.21.6
      - numpydoc==1.5.0
      - packaging==24.0
      - pillow==9.5.0
      - pluggy==1.2.0
      - prompt-toolkit==3.0.48
      - psutil==7.0.0
      - py==1.11.0
      - pycodestyle==2.7.0
      - pycparser==2.21
      - pyflakes==2.3.1
      - pygments==2.17.2
      - pyparsing==3.1.4
      - pytest==7.4.4
      - pytest-cov==4.1.0
      - pytest-flake8==1.1.0
      - pytest-timeout==2.3.1
      - python-dateutil==2.9.0.post0
      - pytz==2025.2
      - pyyaml==6.0.1
      - pyzmq==26.2.1
      - requests==2.31.0
      - six==1.17.0
      - snowballstemmer==2.2.0
      - sphinx==5.3.0
      - sphinxcontrib-applehelp==1.0.2
      - sphinxcontrib-devhelp==1.0.2
      - sphinxcontrib-htmlhelp==2.0.0
      - sphinxcontrib-jsmath==1.0.1
      - sphinxcontrib-qthelp==1.0.3
      - sphinxcontrib-serializinghtml==1.1.5
      - tomli==2.0.1
      - tornado==6.2
      - typing-extensions==4.7.1
      - urllib3==2.0.7
      - wcwidth==0.2.13
      - zipp==3.15.0
prefix: /opt/conda/envs/xonsh

tests/completers/test_pip_completer.py::test_pip_list_re[bagpipes tests/completers/test_pip_completer.py::test_pip_list_re[toxbagpip tests/completers/test_pip_completer.py::test_pip_list_re[$(tompippery tests/completers/test_pip_completer.py::test_pip_list_re[![thewholepipandpaboodle tests/completers/test_pip_completer.py::test_pip_list_re[$[littlebopip tests/completers/test_pip_completer.py::test_pip_list_re[!(boxpip
tests/completers/test_pip_completer.py::test_pip_re[pip] tests/completers/test_pip_completer.py::test_pip_re[xpip tests/completers/test_pip_completer.py::test_pip_re[$(pip] tests/completers/test_pip_completer.py::test_pip_re[![pip] tests/completers/test_pip_completer.py::test_pip_re[$[pip] tests/completers/test_pip_completer.py::test_pip_re[!(xpip]
news/fix_pip_completer.rst xonsh/completers/pip.py
news/fix_pip_completer.rst xonsh/completers/pip.py