alt-v: view source of email

This commit is contained in:
2026-03-11 23:16:19 +01:00
parent f703bc487a
commit 7653f052b7
3 changed files with 11 additions and 8 deletions

View File

@@ -58,6 +58,13 @@ if [ "${1:-}" = "--preview-message" ]; then
exit
fi
if [ "${1:-}" = "--view-source" ]; then
shift
messageid="$1"
less $($NOTMUCH search --output=files id:$messageid)
exit
fi
# FZF default configs
FZF_DEFAULT_PREVIEW_WINDOW="right,80,border-line,wrap-word"
FZF_ALTERNATE_PREVIEW_WINDOW="bottom,80%,border-line,wrap-word"
@@ -81,6 +88,7 @@ if [ "${1:-}" = "--show-thread" ]; then
--bind="enter:" \
--bind="ctrl-h,backward-eof:abort" \
--bind="alt-/:change-preview-window($FZF_ALTERNATE_PREVIEW_WINDOW|$FZF_DEFAULT_PREVIEW_WINDOW)" \
--bind="alt-v:execute:$0 --view-source {5}" \
--preview="$0 --preview-message {5}" \
--preview-window="$FZF_DEFAULT_PREVIEW_WINDOW" || true)
exit