Skip to content

Commit

Permalink
align line numbers after preprocessing
Browse files Browse the repository at this point in the history
  • Loading branch information
dongyx committed Jun 5, 2022
1 parent a8843bf commit d626391
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion cli.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,17 @@ shesc() {
}
preproc() {
awk 'NR == 1 && /^#!/ { next } 1' # ignore shebang
awk '
# replace shebang with a placeholder
# to align line numbers after preprocessing
NR == 1 && /^#!/ {
print "<% -%>"
next
}
{
print
}
'
}
sh=/bin/sh
Expand Down

0 comments on commit d626391

Please sign in to comment.