local tree="$1" root="${2%/}"
local TAB=' '
- first="$(grep -n "$root/" <<< "$tree")"
+ first="$(grep -n "$TAB\{1,\}$root/" <<< "$tree")"
[[ -z "$first" ]] && return
line_num="${first%%:*}"
local tree="$1" subtree
_gsu_setup
+ type -t dialog &> /dev/null
+ if (($? != 0)); then
+ gsu_msg "dialog executable not found"
+ exit 1
+ fi
_get_root_nodes "$tree"
subtree="$result"
_browse "$gsu_name main menu" "$tree" "$subtree"