diff options
author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-11-24 20:16:05 +0100 |
---|---|---|
committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2024-11-24 20:16:05 +0100 |
commit | 034a01e6996d5ee5f3a7f2f440a6aa2b3e29edf2 (patch) | |
tree | 4a28e812e01ca1fe6041e4e5c064368c268de2f1 /modules/by-name/lf | |
parent | fix(modules/lf/ctpv): Improve ctpv config file generation (diff) | |
download | nixos-config-034a01e6996d5ee5f3a7f2f440a6aa2b3e29edf2.tar.gz nixos-config-034a01e6996d5ee5f3a7f2f440a6aa2b3e29edf2.zip |
docs(modules/lf/ctpv/prev/any): Add a fixme
Diffstat (limited to 'modules/by-name/lf')
-rw-r--r-- | modules/by-name/lf/lf/ctpv/prev/any.sh | 44 |
1 files changed, 43 insertions, 1 deletions
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 |