You are not logged in.

#1 2023-08-15 23:30:43

Registered: 2020-12-13
Posts: 1

Wildcards in package queries

I need the the output of:
pacman -Qq | grep '*-git'
But it gives a no matches found error.

Meanwhile running only:
pacman -Qq | grep git
produces a boatload of packages including git, which is not desired for the output.

The only mentions about globs in the man page are about the --overwrite flag when upgrading.

And the only thread I find about pacman and globs is from 2004 where a developer says they're a work in progress. … 036#p46036

Do pacman queries still not support globbing in 2023?


#2 2023-08-16 00:16:10

Inspector Parrot
Registered: 2011-11-29
Posts: 29,095

Re: Wildcards in package queries

Niinu wrote:

pacman -Qq | grep '*-git'

That's not how grep works.  Globs and regular-expressions are not the same thing.

With that, pacman does not use (shell style) globs for searching, but can / does use regular expressions:

pacman -Qsq '.*-git'

"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman


Board footer

Powered by FluxBB