diff options
author | Érico Rolim <erico.erc@gmail.com> | 2020-08-16 17:21:23 -0300 |
---|---|---|
committer | Leah Neukirchen <leah@vuxu.org> | 2020-08-16 22:51:20 +0200 |
commit | dfd0448f83f2ff367009b0cacecbe40ffaeb95de (patch) | |
tree | e04d60373898188d30a3f524a9157ee2d2aeb96d | |
parent | 421079cf380927a074457771a41b6e17da2ad2e5 (diff) | |
download | xtools-dfd0448f83f2ff367009b0cacecbe40ffaeb95de.tar.gz xtools-dfd0448f83f2ff367009b0cacecbe40ffaeb95de.tar.xz xtools-dfd0448f83f2ff367009b0cacecbe40ffaeb95de.zip |
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]
-rwxr-xr-x | xlocate | 5 | ||||
-rw-r--r-- | xtools.1 | 4 |
2 files changed, 5 insertions, 4 deletions
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 diff --git a/xtools.1 b/xtools.1 index 6feb9a8..9f8c631 100644 --- a/xtools.1 +++ b/xtools.1 @@ -83,9 +83,9 @@ but take cwd repo and sudo/su into account .Nd locate files in all XBPS packages .Bl -tag -offset 2n -width 2n -compact .It Fl g -Update a git based xlocate database +Update a git based xlocate database, useful for local repositories .It Fl S -Sync with the official git based xlocate database +Sync with the official git based xlocate database, which is recommended before using the tool .El .It Nm xlog Ar pkg .Nd open commit log for XBPS template |