relativePath property

List<String> get relativePath

fullPath as an invocation names it: without the application name.

A command path never begins with the application name, so this is the shape resolution and default-command lookup work in. Keeping it beside fullPath is what stops the two spellings drifting apart.

Implementation

List<String> get relativePath =>
    parent == null ? const [] : fullPath.skip(1).toList();