V8.13.292.2025.10.27
Some checks failed
🔐 Generating a Private Live ISO TRIXIE. / 🔐 Generating a Private Live ISO TRIXIE. (push) Has been cancelled
🛡️ Retrieve DNSSEC status of coresecret.dev. / 🛡️ Retrieve DNSSEC status of coresecret.dev. (push) Successful in 1m6s
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Has been cancelled

Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
2025-10-27 06:20:43 +00:00
parent 307b2a74aa
commit 18f7afa640
41 changed files with 181 additions and 47 deletions

View File

@@ -236,7 +236,31 @@ sysp() {
#######################################
trel() {
declare depth=${1:-3}
tree -C -h --dirsfirst -L "${depth}"
if ! [[ "${depth}" =~ ^[0-9]+$ ]]; then
echo "Error: '${depth}' is not a valid depth. Please provide a positive integer." >&2
return 2
fi
if ! command -v eza >/dev/null 2>&1; then
echo "Error: 'eza' is not installed." >&2
return 1
fi
(( $# > 0 )) && shift
eza --tree \
--level="${depth}" \
--group-directories-first \
--icons=auto \
--color=always \
--long \
--no-permissions \
--no-user \
--no-time \
"$@"
return 0
}
#######################################