Commit f9ecd647 authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm-sh-functions: skip commented code from help output

parent 21c1f78f
......@@ -210,7 +210,7 @@ set_sudo()
# print options description from HELPCMD/HELPOPT lines in the code
get_help()
{
grep -- "# $1" $0 | while read n ; do
grep -v -- "^#" $0 | grep -- "# $1" | while read n ; do
opt=$(echo $n | sed -e "s|) # $1:.*||g")
desc=$(echo $n | sed -e "s|.*) # $1:||g")
printf " %-20s %s\n" $opt "$desc"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment