Skip to content

Commit

Permalink
fix: removed variation in pool name based display column.
Browse files Browse the repository at this point in the history
  • Loading branch information
reefland committed Jan 13, 2025
1 parent 61b21d6 commit d5cdb31
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions 30-zpool-detailed
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
# Originally Based on work from Mike Roach (https://github.com/mroach)
#
# AUTHOR : Richard J. DURSO
# DATE : 01/02/2025
# VERSION : 1.2
# DATE : 01/13/2025
# VERSION : 1.3
##############################################################################

#!/usr/bin/env bash
Expand Down Expand Up @@ -90,7 +90,7 @@ function bar() {

# Filter out datasets with a percent used smaller than "skip_ds_smaller_than" and
# determine the column with needed to show the pool and datasets based on depth
# depth of datasets to show while not considering datasets filtered out.
# of datasets to show while not considering datasets filtered out.

function remove_unused_DS() {
local index=0
Expand Down Expand Up @@ -150,10 +150,10 @@ for line in "${zfs_list_DS[@]}"; do
if [ "$local_name" = "$name" ]; then
# pool name line
pool_length="${#local_name}"
printf "%-*s" "$((col_width - pool_length +2))" "$name"
printf "%-*s" "$((col_width - 2))" "$name"
else
# dataset line
printf "%-*s" "$((col_width - pool_length +2))" " $local_name"
printf "%-*s" "$((col_width - 2))" " $local_name"
fi
bar "$ds_used_pct" "$snap_used_pct" "$other_used_pct"
#printf "Used %6s of %6s (%6s free)\n" "$(format_bytes "$used")" "$(format_bytes "$capacity")" "$(format_bytes "$avail")"
Expand Down

0 comments on commit d5cdb31

Please sign in to comment.