X-Git-Url: https://git.plutz.net/?a=blobdiff_plain;ds=inline;f=macros%2Finclude;h=5254a2609c91623d2edae92bc14361fc71219407;hb=1293c214db032ca473b2b2ff54acd8e3f7e83d0a;hp=9f3339df5201e617ebfb443d7dc9f3575771eead;hpb=6ccc70ed88ad336b083904f612111c4e093009b2;p=shellwiki diff --git a/macros/include b/macros/include index 9f3339d..5254a26 100755 --- a/macros/include +++ b/macros/include @@ -4,11 +4,7 @@ . "$_EXEC/acl.sh" . "$_EXEC/tools.sh" -from=1 -to=\$ -rev='' -items=\$ -path_info="$PATH_INFO" +from='1'; to='$'; rev=''; items='$'; link='true' while [ $# -gt 0 ]; do case $1 in --from) from="$2"; shift 2;; @@ -18,6 +14,7 @@ while [ $# -gt 0 ]; do case $1 in --items) items="$2"; shift 2;; items=*) items="${1#*=}"; shift 1;; --rev|--reverse) rev="-r"; shift 1;; + --nolink) link=""; shift 1;; *) page="$1"; shift 1;; esac; done @@ -25,7 +22,7 @@ if ! printf %s\\n "$from" |grep -qEx '[0-9]+|/([^/\\]|\\/|\\.)*/'; then debug 'Include macro invalid argument: "from"' exit 1 fi -if ! printf %s\\n "$to" |grep -qEx '[0-9]+|/([^/\\]|\\/|\\.)*/'; then +if ! printf %s\\n "$to" |grep -qEx '\$|[0-9]+|/([^/\\]|\\/|\\.)*/'; then debug 'Include macro Invalid argument: "to"' exit 1 fi @@ -34,27 +31,26 @@ if ! printf %s\\n "$items" |grep -qEx '\$|[0-9]+'; then exit 1 fi -printf '