From 034a01e6996d5ee5f3a7f2f440a6aa2b3e29edf2 Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Sun, 24 Nov 2024 20:16:05 +0100 Subject: docs(modules/lf/ctpv/prev/any): Add a fixme --- modules/by-name/lf/lf/ctpv/prev/any.sh | 44 +++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) (limited to 'modules/by-name') diff --git a/modules/by-name/lf/lf/ctpv/prev/any.sh b/modules/by-name/lf/lf/ctpv/prev/any.sh index 9eb3a422..7209fccb 100644 --- a/modules/by-name/lf/lf/ctpv/prev/any.sh +++ b/modules/by-name/lf/lf/ctpv/prev/any.sh @@ -8,9 +8,51 @@ f="$f" . %HELPERS +# FIXME: Fix the problem, that `???.log.gpg` won't trigger the gpg +# preview, as `cptv` thinks, the extension is `log.gpg` <2024-11-24> +# +# # Before running things on the last extension, ctpv tries to run a preview on the full +# # extension. Therefore, we need to filter these out, to allow the real display to run on +# # them. +# +# full_extension="${f#*.}" +# +# # contains(string, substring) +# # +# # Returns 0 if the specified string contains the specified substring, +# # otherwise returns 1. +# contains() { +# string="$1" +# substring="$2" +# if [ "${string#*"$substring"}" != "$string" ]; then +# return 0 # $substring is in $string +# else +# return 1 # $substring is not in $string +# fi +# } +# +# if contains "$full_extension" "."; then +# sub_extension="${full_extension#*.}" +# base_extension="${full_extension%.*}" +# +# case "$base_extension" in +# "tar") +# # delegate to the archive tool +# exit 127 +# ;; +# esac +# +# case "$sub_extension" in +# "gpg" | "sig" | "key" | "cert" | "asc") +# # delegate to the gpg tool +# exit 127 +# ;; +# esac +# fi + if exiftool "$f" >/dev/null 2>&1; then exiftool -- "$f" else - # Exiftool did not recognize the file. + # `exiftool` did not recognize the file. xxd -- "$f" fi -- cgit 1.4.1