[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: function calls are not referenced for Bash scripts
From: |
Yoshitaro Makise |
Subject: |
Re: function calls are not referenced for Bash scripts |
Date: |
Fri, 18 Jan 2019 10:46:21 +0900 |
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 <address@hidden>:
>
> 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
> address@hidden
> https://lists.gnu.org/mailman/listinfo/bug-global
- function calls are not referenced for Bash scripts, Andrey Butirsky, 2019/01/15
- function calls are not referenced for Bash scripts, Andrey Butirsky, 2019/01/15
- Re: function calls are not referenced for Bash scripts, Shigio YAMAGUCHI, 2019/01/15
- Re: function calls are not referenced for Bash scripts, Andrey Butirsky, 2019/01/15
- Re: function calls are not referenced for Bash scripts,
Yoshitaro Makise <=
- Re: function calls are not referenced for Bash scripts, Andrey Butirsky, 2019/01/17
- Re: function calls are not referenced for Bash scripts, Shigio YAMAGUCHI, 2019/01/17
- Re: function calls are not referenced for Bash scripts, Andrey, 2019/01/18
- Re: function calls are not referenced for Bash scripts, Andrey Butirsky, 2019/01/19