File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
lib/Terminal/Widgets/Volatile Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,12 @@ constant VTree = Terminal::Widgets::Volatile::Tree;
1010role PathContainer {
1111 has IO ::Path: D () $ . path is required ;
1212
13+ # | Short name: just the basename
14+ method short-name () { $ ! path . basename }
15+
16+ # | Long name: full resolved path
17+ method long-name () { $ ! path . resolve }
18+
1319 # | Simplified gist that does not traverse parents, and includes path
1420 method gist (::? CLASS: D : ) {
1521 self . gist-name ~ ' :' ~ $ ! path . path
Original file line number Diff line number Diff line change @@ -7,7 +7,13 @@ unit module Terminal::Widgets::Volatile::Tree;
77role Node {
88 has Node $ . parent ;
99
10- # | Shortened name for gists
10+ # | REQUIRED: Short name for display, usually unique within siblings
11+ method short-name () { ... }
12+
13+ # | REQUIRED: Long name for display, usually unique within entire tree
14+ method long-name () { ... }
15+
16+ # | Shortened class name for gists
1117 method gist-name () {
1218 self .^ name . subst (' Terminal::Widgets::' , ' ' )
1319 }
You can’t perform that action at this time.
0 commit comments