add whatprovides option (via xlocate)
This commit is contained in:
parent
f520a9f557
commit
ec69b4b7f0
12
vpm
12
vpm
|
@ -210,6 +210,8 @@ usage () {
|
|||
t "xbps-remove -v -O"
|
||||
echo "autoremove (ar) - Remove orphaned packages"
|
||||
t "xbps-remove -v -O"
|
||||
echo "whatprovides (wp) <file> - Search for package containing <file>"
|
||||
t "xlocate <pkg>"
|
||||
echo "help - Show usage information"
|
||||
echo "helppager (hp) - Show usage information (will pipe output to less/more)"
|
||||
echo
|
||||
|
@ -536,6 +538,16 @@ case "$arg" in
|
|||
fi
|
||||
;;
|
||||
|
||||
whatprovides|wp)
|
||||
if hash xlocate >/dev/null 2>&1; then
|
||||
shift
|
||||
# set -x
|
||||
# xlocate -S "$@"
|
||||
msg "relaying to: \"xlocate $@\" - use xlocate -S to (re-)build cached DB."
|
||||
xlocate "$@"
|
||||
fi
|
||||
;;
|
||||
|
||||
''|*)
|
||||
a="$1"
|
||||
if hash "xbps-${a}" >/dev/null 2>&1; then
|
||||
|
|
Loading…
Reference in New Issue