Skip to content

Commit

Permalink
fixed error in --list
Browse files Browse the repository at this point in the history
  • Loading branch information
mfhepp committed Jan 27, 2024
1 parent b847c7a commit 6350ba7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cdf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 6350ba7

Please sign in to comment.