-
Notifications
You must be signed in to change notification settings - Fork 124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
search for alternatives providers with xbps-query? #499
Comments
Yeah, that would be handy. |
The way the packages alternatives property is setup and how we print properties would require special handling for this case. I added a repository mode to |
Lurking around I found this issue, and I remembered I have a patch for that dmarto@90d2891 My use case is the following script (that I use in combo with another one to find files that are not created/managed/owned by a package). #!/bin/bash
# xalts [STRING]
# alternatives search, prints results in xbps-query -o compatible way
while read alt; do
[ -z "${alt}" ] && continue
alt=${alt% (*)}
pkg=${alt%%:*}
real=${alt##*:}
dir=$(dirname "$real")
link=${alt#*: }
link=${link%:*}
[ "$(dirname "$link")" = "." ] && link="$dir/$link"
echo "$pkg: $link -> $real (link)"
done <<< $(x xbps-query -R -p alternatives --search="$1") If it is of intereset, I could open a PR. |
xbps-query -Rp alternatives -s vi
returns nothing currently (exits 2). perhaps it should search for all packages that provide thevi
alternative set.The text was updated successfully, but these errors were encountered: