FS#55342 - Be able to to limit the search field to the package name

Attached to Project: Pacman
Opened by Chunyang Xu (xuchunyang) - Wednesday, 30 August 2017, 09:14 GMT
Task Type Feature Request
Category General
Status Unconfirmed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version 5.0.1
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No

Details

Summary and Info:

"pacman -Ss <pat>" searches across both the package name and description, but sometimes I want to search only the package name, can pacman provide a way for this? such as add a option like "--only-name", then I can use "pacman -Ss --only-name <pat>".

Steps to Reproduce:
This task depends upon

Comment by Andrew Gregory (andrewgregory) - Wednesday, 30 August 2017, 13:22 GMT
pacsift --name
Comment by Chunyang Xu (xuchunyang) - Wednesday, 30 August 2017, 17:02 GMT
Thanks. I've installed pacutils and tried pacsift, it worked! I also know how to achieve my purpose via grep or awk, but I still think a built-in solution is useful and ease to use for end user.

---
~ $ pacman -Ssq | grep pattern
qt5-xmlpatterns
haskell-pattern-arrows
~ $ pacman -Ss | awk -F"[/ ]" '{ if ($2 ~ /pattern/) { print; getline; print } else getline }'
extra/qt5-xmlpatterns 5.9.1-2 (qt qt5)
Support for XPath, XQuery, XSLT and XML schema validation
community/haskell-pattern-arrows 0.0.2-3
Arrows for Pretty Printing
~ $

Loading...