#!/bin/bash [ "$1" = "-h" ] && die $(cat <<-EOF Usage: subgit ls Lists all tracked subrepositories (relative paths) from the current subgit container's .subgitrc file. EOF ) root=$(subgit-source root .) source "$root/.subgitrc" for subrepo in "${!subgit[@]}"; do echo "$subrepo" done