aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2016-12-09 10:42:44 +1300
committerTom Ryder <tom@sanctum.geek.nz>2016-12-09 10:42:44 +1300
commitc99a69b11eeda363efac03dd82e413abc661313f (patch)
treedae8b27efe52a228e1f8a67dec8b4aafaf84299d
parentAdd chc(1df) (diff)
downloaddotfiles-c99a69b11eeda363efac03dd82e413abc661313f.tar.gz
dotfiles-c99a69b11eeda363efac03dd82e413abc661313f.zip
Refine loc(1df) a bit
-rwxr-xr-xbin/loc2
-rw-r--r--man/man1/loc.1df3
2 files changed, 3 insertions, 2 deletions
diff --git a/bin/loc b/bin/loc
index 20ef432e..813196c8 100755
--- a/bin/loc
+++ b/bin/loc
@@ -4,5 +4,5 @@ if [ "$#" -eq 0 ] ; then
exit 2
fi
for pat ; do
- find . -name '*'"$pat"'*'
+ find . -name '.*' ! -name '.' -prune -o -name '*'"$pat"'*' -prune -print
done
diff --git a/man/man1/loc.1df b/man/man1/loc.1df
index 55890f37..f288402c 100644
--- a/man/man1/loc.1df
+++ b/man/man1/loc.1df
@@ -8,6 +8,7 @@
.B loc
is a simple wrapper around find(1) which searches in the current directory tree
for filenames matching a pattern, and prints them to stdout, newline-separated.
-It is intended only for interactive use.
+It skips dotfiles, and doesn't interate further into a directory if it matches
+the terms. It is intended only for interactive use as a shortcut.
.SH AUTHOR
Tom Ryder <tom@sanctum.geek.nz>