Generate all sub paths
Suppose that the path consists of edges $e_1,\ldots,e_\ell$. The following answer assumes that by "subpath" you mean a partition of $e_1,\ldots,e_\ell$ into intervals. Go over all possible values of $b_1,\ldots,b_{\ell-1} \in \{T,F\}$. If $b_i = T$ then the edge $e_i$ ends an interval. Otherwise it doesn't. Here is how this looks in your case, $\ell=4$:
$$
\begin{array}{ccc|c}
b_1 &amp; b_2 &amp; b_3 &amp; \text{subpath} \\\hline
F &amp; F &amp; F &amp; e_1e_2e_3e_4 \\
F &amp; F &amp; T &amp; e_1e_2e_3;e_4 \\
F &amp; T &amp; F &amp; e_1e_2;e_3e_4 \\
F &amp; T &amp; T &amp; e_1e_2;e_3;e_4 \\
T &amp; F &amp; F &amp; e_1;e_2e_3e_4 \\
T &amp; F &amp; T &amp; e_1;e_2e_3;e_4 \\
T &amp; T &amp; F &amp; e_1;e_2;e_3e_4 \\
T &amp; T &amp; T &amp; e_1;e_2;e_3;e_4 \\
\end{array}
$$