From dfd0448f83f2ff367009b0cacecbe40ffaeb95de Mon Sep 17 00:00:00 2001 From: Érico Rolim Date: Sun, 16 Aug 2020 17:21:23 -0300 Subject: xlocate: add warning when using xbps-query. Also: - Fix some indentation. - Add notes about -g and -S options in manual Closes: #194 [via git-merge-pr] --- xlocate | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'xlocate') diff --git a/xlocate b/xlocate index fdd79d5..231b276 100755 --- a/xlocate +++ b/xlocate @@ -6,7 +6,7 @@ : ${XLOCATE_CONF:="${XDG_CONFIG_HOME}/xlocate.conf"} if [ -f "${XLOCATE_CONF}" ]; then - . "${XLOCATE_CONF}"; + . "${XLOCATE_CONF}"; fi : ${XLOCATE_GIT:=$XDG_CACHE_HOME/xlocate.git} @@ -31,7 +31,7 @@ xupdategit() { file = substr($0, s+2) sub(" *\\([^)]*\\)$", "", file) print file >>pkg - }' + }' printf '%s\n' ./* | LC_ALL= xargs -d'\n' -I'{}' -n1 -P "$(nproc)" -r -- \ sort -o {} {} @@ -81,6 +81,7 @@ if [ -d "$XLOCATE_GIT" ]; then git -c grep.lineNumber=false --git-dir="$XLOCATE_GIT" grep -- "$@" @ | sed 's/^@://; s/:/\t/' | grep . else + echo "xlocate: database not found, using xbps-query." 1>&2 xbps-query --regex -Ro -- "$@" | sed 's/ *([^)]*)$//; s/^\([^ ]*\)-[^-]*: /\1\t/' fi -- cgit 1.4.1