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
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:
@@ -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
|
||||
}
|
||||
|
||||
#######################################
|
||||
|
||||
Reference in New Issue
Block a user