I'm stumped on this one, and I'm embarrassed to say how long I've spent on it. I like to see threads in neomutt index, but I'd like to be able to toggle thread settings between these two settings:
# use threads
set use_threads=reverse sort=last-date sort_aux=last-date
# don't use threads
set use_threads=no sort=reverse-date-sent
I can get this working through two separate macros:
macro index <tab> "<enter-command>set use_threads=reverse sort=last-date sort_aux=last-date<enter>"
macro index <backtab> "<enter-command>set use_threads=no sort=reverse-date-sent<enter>"
My hope was to use <tab>
to toggle between the two settings, but I can't figure out how to build if ? then : else
into a single macro.
I tried creating a shell script to help offload the logic, but I couldn't figure out how to send the current value of $use_threads to the script.