add retro-locate to search the tags file generated by retro-tags
FossilOrigin-Name: f85240e729d909e1e9b244692f41568a77deae68e3ab6304fc456188389884ca
This commit is contained in:
parent
128b62c44b
commit
b9a787c714
3 changed files with 10 additions and 0 deletions
2
Makefile
2
Makefile
|
@ -32,6 +32,7 @@ install: build install-data install-docs install-examples install-manpages
|
|||
install -c -m 755 bin/retro-describe $(DESTDIR)$(PREFIX)/bin/retro-describe
|
||||
install -c -m 755 bin/retro-document $(DESTDIR)$(PREFIX)/bin/retro-document
|
||||
install -c -m 755 example/retro-tags.retro $(DESTDIR)$(PREFIX)/bin/retro-tags
|
||||
install -c -m 755 example/retro-locate.retro $(DESTDIR)$(PREFIX)/bin/retro-locate
|
||||
|
||||
install-strip: build install-data install-docs install-examples
|
||||
install -m 755 -d -- $(DESTDIR)/bin
|
||||
|
@ -43,6 +44,7 @@ install-strip: build install-data install-docs install-examples
|
|||
install -c -m 755 bin/retro-describe $(DESTDIR)$(PREFIX)/bin/retro-describe
|
||||
install -c -m 755 bin/retro-document $(DESTDIR)$(PREFIX)/bin/retro-document
|
||||
install -c -m 755 example/retro-tags.retro $(DESTDIR)$(PREFIX)/bin/retro-tags
|
||||
install -c -m 755 example/retro-locate.retro $(DESTDIR)$(PREFIX)/bin/retro-locate
|
||||
|
||||
install-data:
|
||||
install -m 755 -d -- $(DESTDIR)$(DATADIR)
|
||||
|
|
6
example/retro-locate.retro
Executable file
6
example/retro-locate.retro
Executable file
|
@ -0,0 +1,6 @@
|
|||
#!/usr/bin/env retro
|
||||
|
||||
~~~
|
||||
'Line var
|
||||
'tags [ &Heap [ ASCII:HT s:tokenize !Line @Line #0 a:fetch #0 sys:argv s:eq? [ @Line #2 a:fetch @Line #1 a:fetch s:put $: c:put s:put nl ] if ] v:preserve ] file:for-each-line
|
||||
~~~
|
|
@ -6,6 +6,8 @@ rm -f tags
|
|||
touch tags
|
||||
find . -name '*.retro' -print0 | xargs -0 -n 1 retro $0 >>tags
|
||||
find . -name '*.forth' -print0 | xargs -0 -n 1 retro $0 >>tags
|
||||
cat tags | sort | uniq >tags2
|
||||
mv tags2 tags
|
||||
exit
|
||||
|
||||
--------------------------------------------------------------
|
||||
|
|
Loading…
Reference in a new issue