FS#63074 - [pacman] Add regular expressions support for NoExtract= directive to shorten/group patterns
Attached to Project:
Pacman
Opened by marcin82 (marcin82) - Tuesday, 02 July 2019, 18:48 GMT
Last edited by Dave Reisner (falconindy) - Tuesday, 02 July 2019, 18:50 GMT
Opened by marcin82 (marcin82) - Tuesday, 02 July 2019, 18:48 GMT
Last edited by Dave Reisner (falconindy) - Tuesday, 02 July 2019, 18:50 GMT
|
Details
It's rather question than feature request. Maybe I'm missing
something, but is there any method/syntax to group/shorten
one expression to another, as follows - to mark alternatives
with curly brackets or pipe | :
`NoExtract = usr/share/doc/* usr/share/gtk-doc/* usr/share/help/* usr/share/info/* usr/share/licenses/*` `NoExtract = usr/share/{doc,gtk-doc,help,info,licenses}/*` or `NoExtract = */locale/*` `NoExtract = */locales/*` to: `NoExtract = */locale(|s)/*` |
This task depends upon
Does the shell-style glob pattern support do what you need it to do? Most of the examples you've listed are for that.
The problem is exactly that these and similar expressions, like examples, just don't work (instead of asterisk of course). Grouping don't work.
To compare - bash globbing:
https://linuxhint.com/bash_globbing_tutorial/
http://tldp.org/LDP/abs/html/globbingref.html
http://tldp.org/LDP/GNU-Linux-Tools-Summary/html/x11655.htm
* ? [
That means you can use e.g. [abc] or [[:alpha:]] as well, which you did not mention in your original question but which are mentioned in your links.
Use of {} is not globbing and the tutorials you've been looking at are unreliable and in this case wrong. They describe the effects of {} which in bash is known as brace expansion, and they group it under "globbing". However, in bash, brace expansion is the first form of expansion which is performed -- globbing is part of pathname expansion, which is the seventh and last form of expansion.