[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ctags/etags: rc file?
From: |
Ivan Shmakov |
Subject: |
Re: ctags/etags: rc file? |
Date: |
Thu, 20 Nov 2014 12:12:22 +0000 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
>>>>> Alfred M Szmidt <address@hidden> writes:
[…]
> If .etags (one argument per line) contains,
> --language=none
> --regex='/[ \t]*function.*=[ \t]*\([^ \t]*\)[ \t]*(/\1/'
> --regex='/###key \(.*\)/\1/'
> --regex='/[ \t]*global[ \t].*/'
> *.m
Isn’t it already possible with xargs(1)? Depending on the shell
in use, it may be possible to, say:
$ etagx () { (cat < .etags ; printf %s\\n "$@") | xargs etags ; }
$ etagx *.m
> And then issuing "etags -Z" (or some other sensible short option) it
> would be equivalent to running,
> etags --language=none --regex='/[ \t]*function.*=[ \t]*\([^ \t]*\)[
> \t]*(/\1/' --regex='/###key \(.*\)/\1/' --regex='/[ \t]*global[
> \t].*/' *.m
The last ‘*.m’ bit would require duplicating shell’s own
wildcard expansion in Etags, and it doesn’t seem like an
outright clever idea to me.
--
FSF associate member #7257 np. Afraid to Shoot Strangers — Iron Maiden