prefix-dev / pixi

Package management made easy
https://pixi.sh
BSD 3-Clause "New" or "Revised" License
3.38k stars 192 forks source link

[ZSH] Pixi search requires double quotes to use the wildcard #2519

Open AlexisTM opened 3 days ago

AlexisTM commented 3 days ago

Checks

Reproducible example

$ zsh
$ pixi search ros-jazzy*
zsh: no matches found: ros-jazzy*
$  pixi search "ros-jazzy*"
Using channels: conda-forge, robostack-jazzy
Package                                  Version             Channel            
ros-jazzy-tf2                            0.36.4              robostack-jazzy/linux-64
ros-jazzy-rmw                            7.3.1               robostack-jazzy/linux-64
ros-jazzy-rcl                            9.2.3               robostack-jazzy/linux-64
ros-jazzy-tlsf                           0.9.0               robostack-jazzy/linux-64
ros-jazzy-urdf                           2.10.0              robostack-jazzy/linux-64

Issue description

Using zsh adds the need to use double quotes when using the wildcard in the command line

Expected behavior

The search term doens't need to be quoted, even using wildcard in zsh

JamesParrott commented 3 days ago

Expected behavior

The search term doens't need to be quoted, even using wildcard in zsh

I think this is just how ZSH works. There's nothing Pixi or any command line application can do to stop shells from expanding wild card glob characters. The user must use the correct syntax for whichever shell they choose to use. Bash works the same way (see below, but in this case Bash has expanded the search term nt*, and found it matches some files in the particular directory ).

MINGW64 ~
$ python -c "import sys; print(sys.argv[1:])" nt*
['ntuser.dat.LOG1', 'ntuser.dat.LOG2', 'ntuser.ini']