summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMantas Mikulėnas <grawity@gmail.com>2024-02-15 09:46:57 +0200
committerMantas Mikulėnas <grawity@gmail.com>2024-02-15 09:52:15 +0200
commite41670cde22959470f6b9ffef6e978e4f24d2cd5 (patch)
treecddbd86444d959a34a50a842aa9f4bc265d17fbe
parent8ea7fba83daff5759736755dc05193d3803bf516 (diff)
with -ff, show full path for leaf objects
Technically, for objects that exist (non-ghosts), but currently let's assume that `find -type f` would be the input.
-rwxr-xr-xtreeify6
1 files changed, 5 insertions, 1 deletions
diff --git a/treeify b/treeify
index 74388c1..9364795 100755
--- a/treeify
+++ b/treeify
@@ -142,7 +142,11 @@ sub show {
$n_children = deepcount($node);
}
- if ($opt{print_full}) {
+ my $print_full = ($opt{print_full} == 2) ? $exists
+ : ($opt{print_full} == 1) ? 1
+ : 0;
+
+ if ($print_full) {
# Display full path of the current node
if ($path eq $opt{separator}) {
$name = $opt{reverse}