Hello,
For shell scripts, pygments plugin does not support function
references. It just support variables for references.
----------------------
$ cat test.sh
#!/bin/bash
foo() {
bar
}
bar() {
echo $message
}
message=hello
foo
$ gtags
$ gtags -d GRTAGS
__.COMPACT __.COMPACT
__.COMPLINE __.COMPLINE
__.COMPNAME __.COMPNAME
__.VERSION __.VERSION 6
echo 1 @n 8
message 1 @n 8,3
$ global -sx message
message 8 test.sh echo $message
message 11 test.sh message=hello
----------------------
This behavior comes from the pygments syntax highlighter's limitation.
It cannot detect function references.
----------------------
$ pygmentize -l sh -f raw test.sh | grep '^Token.Name'
Token.Name.Builtin 'echo'
Token.Name.Variable '$message'
Token.Name.Variable 'message'
----------------------
Regards,
2019年1月16日(水) 11:48 Andrey Butirsky <[email protected]>:
>
> Actually, I don't know, probably not.
> I wonder if we could just force it to pick up all the simple commands?
>
> On 16.01.2019 02:20, Shigio YAMAGUCHI wrote:
> > Hello,
> > Does Pygments pick up function references (It may look like a command call)?
> > If not, there may be nothing you can do but to rewrite the program.
>
> _______________________________________________
> Bug-global mailing list
> [email protected]
> https://lists.gnu.org/mailman/listinfo/bug-global
_______________________________________________
Bug-global mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-global