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