Repository: conda/conda

Issue:
[4.6.0b0] conda list conda spews irrelevant packages
Fairly sure this used to be more specific. Seems to be unwantedly matching on channel. If that new behaviour is by design is there some way to switch it off? 
```
λ conda list conda
# packages in environment at C:\Miniconda3:
#
# Name                    Version                   Build  Channel
altair                    2.2.2                      py_0    conda-forge
anaconda-client           1.7.1                    py36_0
anaconda-navigator        1.8.7                    py36_0
anaconda-project          0.8.2                    py36_0
arrow-cpp                 0.10.0          py36_vc14h12fa3ca_0  [vc14]  conda-forge
async_generator           1.10                       py_0    conda-forge
autograd                  1.2                        py_1    conda-forge
backports.functools_lru_cache 1.5                        py_1    conda-forge
bleach                    2.1.4                      py_0    conda-forge
boost-cpp                 1.67.0               hea38baa_0    conda-forge
boto3                     1.7.80                     py_0    conda-forge
botocore                  1.10.80                    py_0    conda-forge
ca-certificates           2018.8.24            ha4d7672_0    conda-forge
cachetools                2.1.0                      py_0    conda-forge
cftime                    1.0.1            py36h452e1ab_0    conda-forge
clangdev                  5.0.0                   flang_3  [flang vc14]  conda-forge
cmake                     3.12.1               he025d50_0    conda-forge
conda                     4.6.0b0                  py36_0    conda-canary
conda-build               3.13.0                   py36_0
conda-build-all           1.1.3                      py_0    conda-forge
conda-env                 2.6.0                         1
conda-forge-pinning       2018.08.14                    0    conda-forge
conda-smithy              3.1.12                     py_0    conda-forge
conda-verify              2.0.0            py36h065de53_0
contextvars               2.3                        py_0    conda-forge
cryptography              2.3.1            py36h74b6da3_0    conda-forge
cryptography-vectors      2.3.1                    py36_0    conda-forge
defusedxml                0.5.0                    py36_0    conda-forge
docker-py                 3.5.0                    py36_0    conda-forge
docker-pycreds            0.3.0                      py_1    conda-forge
flatbuffers               1.9.0                h6538335_1    conda-forge
fonts-anaconda            1                    h8fa9717_0
fs.sshfs                  0.8.0                    py36_0    conda-forge
gensim                    3.5.0               py36_vc14_0  [vc14]  conda-forge
gitdb2                    2.0.4                      py_0    conda-forge
grpcio                    1.14.1           py36he089993_0    conda-forge
h5netcdf                  0.6.2                      py_0    conda-forge
hypothesis                3.69.0           py36h39e3cac_0    conda-forge
immutables                0.6              py36hfa6e2cd_0    conda-forge
invoke                    1.2.0                    py36_0    conda-forge
ipympl                    0.2.1                    py36_0    conda-forge
jpeg                      9c                   hfa6e2cd_0    conda-forge
jupyterlab                0.34.0                   py36_0    conda-forge
ldap3                     2.5.1                      py_0    conda-forge
libflang                  5.0.0             vc14_20180208  [vc14]  conda-forge
libpng                    1.6.35               h7602738_0    conda-forge
libxcb                    1.13                 hcb389fa_2    conda-forge
llvm-meta                 6.0.1                         0    conda-forge
llvmdev                   6.0.1                h4de0a4f_2    conda-forge
lz4-c                     1.8.2                he025d50_0    conda-forge
mkl_fft                   1.0.6                    py36_0    conda-forge
<snip>
...dozens more...
```
```


Discussion:
That’s a regression. Thanks for the report!
No problems - I'm kicking the tires as the killer feature for me is being able to specify channels with the `defaults::numpy` syntax in `env.yml` files.

I also had a problem with `conda init cmd.exe` but fixed it and now can't repro. I'll see if can recreate it and if so will open an issue.

Resolving patch:
diff --git a/conda/cli/main_list.py b/conda/cli/main_list.py
--- a/conda/cli/main_list.py
+++ b/conda/cli/main_list.py
@@ -27,7 +27,7 @@ def print_export_header(subdir):
 def get_packages(installed, regex):
     pat = re.compile(regex, re.I) if regex else None
     for prefix_rec in sorted(installed, key=lambda x: x.name.lower()):
-        if pat and pat.search(str(prefix_rec)) is None:
+        if pat and pat.search(prefix_rec.name) is None:
             continue
         yield prefix_rec
 


Test patch: