diff options
-rw-r--r-- | cdlog.sh | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -90,7 +90,7 @@ cdlog.init() cdlog.recover() { - local dir + local dirs local i local sel @@ -99,9 +99,11 @@ cdlog.recover() if [ $# -gt 0 -a $1 != ~/.cdlog.'*'.dirs ] ; then printf "These cdlog contexts exist:\n" i=0 - for dir in "$@"; do - printf "[%d]: %s\n" $((++i)) "$(date -r "$dir")" - sed -e '/^$/d' "$dir" | head -9 + for dirs in "$@"; do + printf "[%d]: %s%s\n" $((++i)) \ + "$([ "$dirs" = "$cdlog_dirs" ] && printf "[current] ")" \ + "$(date -r "$dirs")" + sed -e '/^$/d' "$dirs" | head -9 done while true; do |