_gsu_setup
fi
-export GSU_NODE_NAME_PATTERN='[a-zA-Z_]'
+_gsu_node_name_pattern='[a-zA-Z_]'
_get_geometry()
{
_get_level()
{
- local tmp="${1%%$GSU_NODE_NAME_PATTERN*}"
+ local tmp="${1%%$_gsu_node_name_pattern*}"
result="${#tmp}"
}
#echo "line: $line_num, root: $root, indent level: $level"
result="$(sed -e "1,${line_num}d;" <<< "$tree" \
- | sed -e "/^$TAB\{1,$level\}$GSU_NODE_NAME_PATTERN/,\$d" \
+ | sed -e "/^$TAB\{1,$level\}$_gsu_node_name_pattern/,\$d" \
| sed -e "/^$TAB\{$(($level + 2))\}/d")"
ret="$level"
}
{
local tree="$1" TAB=' '
- result="$(grep "^${TAB}${GSU_NODE_NAME_PATTERN}" <<< "$tree")"
+ result="$(grep "^${TAB}${_gsu_node_name_pattern}" <<< "$tree")"
}
_browse()