From 6350ba723c4258bf69b910d02c4fd3fe9529028d Mon Sep 17 00:00:00 2001 From: mfhepp Date: Sat, 27 Jan 2024 02:40:22 +0100 Subject: [PATCH] fixed error in --list --- cdf.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cdf.sh b/cdf.sh index 6a21dec..6533673 100644 --- a/cdf.sh +++ b/cdf.sh @@ -28,7 +28,10 @@ _cdf_list() { printf "Existing directory shortcuts are:\n" # Note: We are looking for symbolic links, hence l # Old version: find $CDFPATH -maxdepth 1 -type l -exec basename {} \; | sort | sed 's/^/ - /' - for link in ./*; do echo " - $(basename "$link") [$(readlink -f "$link")]"; done + # for link in ./*; do echo " - $(basename "$link") [$(readlink -f "$link")]"; done + find "$CDFPATH" -maxdepth 1 -type l -print0 | while IFS= read -r -d '' symlink; do + echo " - $(basename "$symlink") [$(realpath "$symlink")]" + done echo }