chmln / handlr

A better xdg-utils
MIT License
633 stars 25 forks source link

Wildcards with get? #41

Open ckp95 opened 3 years ago

ckp95 commented 3 years ago

Readme says wildcards are supported, but it doesn't seem to work with get.

$ handlr list
┌───────────────────────────────────┬────────────────────────────────┐
│ application/octet-stream          │ mousepad.desktop               │
│ application/pdf                   │ org.pwmt.zathura.desktop       │
│ application/x-gettext-translation │ mousepad.desktop               │
│ application/x-wine-extension-ini  │ mousepad.desktop               │
│ application/xml                   │ mousepad.desktop               │
│ image/gif                         │ viewnior.desktop, gimp.desktop │
│ image/jpeg                        │ viewnior.desktop, gimp.desktop │
│ image/png                         │ viewnior.desktop, gimp.desktop │
│ text/plain                        │ mousepad.desktop               │
│ video/mp4                         │ mpv.desktop                    │
│ video/ogg                         │ vlc.desktop                    │
│ video/x-flv                       │ vlc.desktop                    │
│ video/x-ms-wmv                    │ vlc.desktop                    │
│ video/x-ogm+ogg                   │ vlc.desktop                    │
│ video/x-theora+ogg                │ vlc.desktop                    │
└───────────────────────────────────┴────────────────────────────────┘

So I expect when I run handlr get 'video/*' it will filter the list to just the video entries. But it doesn't:

$ handlr get 'video/*'
no handlers found for 'video/*'
joleeee commented 2 years ago

The wildcards means you can do handlr set 'video/*' mpv.desktop to set all video types to mpv instead of having to set it for all the video/ types individually. Quotes are just for preventing shell expansion.

You still need to provide a valid mimetype to handlr get