Commit 919fc1c4 authored by Vitaly Lipatov's avatar Vitaly Lipatov

get_help: add support for subfile help

parent aafb696e
......@@ -450,8 +450,10 @@ get_help()
if [ "$0" = "/dev/stdin" ] || [ "$0" = "sh" ] ; then
return
fi
local F="$0"
[ -n "$2" ] && F="$(dirname $0)/$2"
cat $0 | grep -- "# $1" | while read -r n ; do
cat "$F" | grep -- "# $1" | while read -r n ; do
if echo "$n" | grep -q "# $1: PART: " ; then
echo
echo "$n" | sed -e "s|# $1: PART: ||"
......
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