about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2020-08-16 22:53:50 +0200
committerLeah Neukirchen <leah@vuxu.org>2020-08-16 22:53:50 +0200
commit74bb5d9b00e345038303d7dea9846b5087acaba8 (patch)
tree46d826e320c3e421f7a396354c7f4820c0a6894f
parentdfd0448f83f2ff367009b0cacecbe40ffaeb95de (diff)
downloadxtools-74bb5d9b00e345038303d7dea9846b5087acaba8.tar.gz
xtools-74bb5d9b00e345038303d7dea9846b5087acaba8.tar.xz
xtools-74bb5d9b00e345038303d7dea9846b5087acaba8.zip
xlocate: fix argument passing to xbps-query --regex -Ro
Due to ERE, this also works if the argument starts with ^!.

Fixes #193.
-rwxr-xr-xxlocate2
1 files changed, 1 insertions, 1 deletions
diff --git a/xlocate b/xlocate
index 231b276..49b6ac5 100755
--- a/xlocate
+++ b/xlocate
@@ -82,6 +82,6 @@ if [ -d "$XLOCATE_GIT" ]; then
 		sed 's/^@://; s/:/\t/' | grep .
 else
 	echo "xlocate: database not found, using xbps-query." 1>&2
-	xbps-query --regex -Ro -- "$@" |
+	xbps-query --regex -Ro '.*'"$@" |
 		sed 's/ *([^)]*)$//; s/^\([^ ]*\)-[^-]*: /\1\t/'
 fi