Skip to content

Commit 911aec2

Browse files
Simplify source searcher; improve usage example
FossilOrigin-Name: 5aa9f009fe1c9559df42802b2cd19b48af58b23bfd4c4427e480cb3cc89cbb49
1 parent e123a8b commit 911aec2

File tree

2 files changed

+10
-12
lines changed

2 files changed

+10
-12
lines changed

src/doc/manual_skeleton.adoc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
// This file is part of Solo Forth
1111
// http://programandala.net/en.program.solo_forth.html
1212

13-
// Last modified: 202003012143
13+
// Last modified: 202003012156
1414

1515
toc::[]
1616

@@ -616,12 +616,12 @@ The script uses ``ack`` by default; if ``ack`` is not installed,
616616
Usage examples:
617617

618618
----
619-
tools/search_sources use-thru-index
620-
tools/search_sources use-thru-index -l
621-
tools/search_sources color
622-
tools/search_sources ";\s:\s"
623-
tools/search_sources "\-bank"
624-
tools/search_sources "code\s+\S+\s+\("
619+
./tools/search_sources use-thru-index
620+
./tools/search_sources use-thru-index -l
621+
./tools/search_sources color
622+
./tools/search_sources ";\s:\s"
623+
./tools/search_sources "\-bank"
624+
./tools/search_sources "code\s+\S+\s+\("
625625
----
626626

627627
// How to test and benchmark {{{1

tools/search_sources

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# This file is part of Solo Forth
66
# http://programandala.net/en.program.solo_forth.html
77

8-
# Last modified: 202003012113
8+
# Last modified: 202003012155
99

1010
# Search the sources of Solo Forth using ack (by default) or grep
1111
# (when ack is not installed). All parameters and options are passed
@@ -14,9 +14,7 @@
1414
# 2020-03-01
1515

1616
dirs="./src/kernel*.z80s ./src/lib/*.fs"
17-
errors_file=./tmp/search_sources_errors
1817

19-
ack $* -r $dirs 2>$errors_file || \
20-
grep $* -r $dirs 2>$errors_file
18+
ack $* -r $dirs 2>/dev/null || \
19+
grep $* -r $dirs 2>/dev/null
2120

22-
rm -f $errors_file

0 commit comments

Comments
 (0)