aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsfm6
1 files changed, 4 insertions, 2 deletions
diff --git a/sfm b/sfm
index 744c98c..afc6575 100755
--- a/sfm
+++ b/sfm
@@ -94,17 +94,19 @@ load_entries() {
# build list of dir names then file names, including dotfiles if enabled
for d in "$CWD"/*/; do
[ -d "$d" ] || continue
+ [ -L "${d%/}" ] && continue # symlinks handled separately
name="${d%/}"; name="${name##*/}"
[ "$name" = "*" ] && continue
- case "$name" in .*) continue ;; esac # skip dotdirs here, handle below
+ case "$name" in .*) continue ;; esac
ENTRIES="$ENTRIES
${name}/"
COUNT=$((COUNT + 1))
done
if [ "$SHOW_HIDDEN" = "1" ]; then
- for d in "$CWD"/./; do : ; done # no-op, just to avoid error
+ for d in "$CWD"/./; do : ; done
for d in "$CWD"/.*/; do
[ -d "$d" ] || continue
+ [ -L "${d%/}" ] && continue # symlinks handled separately
name="${d%/}"; name="${name##*/}"
[ "$name" = "." ] || [ "$name" = ".." ] && continue
[ "$name" = ".*" ] && continue