Compare commits
2 commits
bb787cc0cc
...
b0afca09a5
Author | SHA1 | Date | |
---|---|---|---|
b0afca09a5 | |||
96bf706e32 |
1 changed files with 7 additions and 6 deletions
13
sh/doc.awk
13
sh/doc.awk
|
@ -40,7 +40,7 @@ BEGIN {
|
|||
{
|
||||
# doc
|
||||
if (match($0, RE_SHEBANG, m)) {
|
||||
append(m[1])
|
||||
append("shebang: " m[1])
|
||||
} else if (match($0, RE_DOC, m)) {
|
||||
append(m[1])
|
||||
} else if (match($0, RE_ALIAS, m)) {
|
||||
|
@ -56,24 +56,25 @@ BEGIN {
|
|||
}
|
||||
} else if (match($0, RE_SET, m)) {
|
||||
if (m[1] == target) {
|
||||
print "set"
|
||||
printf "set: "
|
||||
output(m[1])
|
||||
} else {
|
||||
reset()
|
||||
}
|
||||
} else if (match($0, RE_FUNCTION, m)) {
|
||||
if (alias) {
|
||||
print "alias"
|
||||
output(target)
|
||||
print "alias: " target
|
||||
printf "function: "
|
||||
output(m[1])
|
||||
} else if (m[1] == target) {
|
||||
print "function"
|
||||
printf "function: "
|
||||
output(target)
|
||||
} else {
|
||||
reset()
|
||||
}
|
||||
} else {
|
||||
if (module) {
|
||||
print "module"
|
||||
printf "module: "
|
||||
output(target)
|
||||
} else {
|
||||
reset()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue