Can index lines be wrapped?
Cameron Simpson
cs at cskk.id.au
Fri Aug 13 22:56:37 UTC 2021
On 13Aug2021 08:17, Chris Green <cl at isbd.net> wrote:
>On Fri, Aug 13, 2021 at 08:15:26AM +0200, Alexander Dahl wrote:
>> On Thu, Aug 12, 2021 at 08:30:11AM +0100, Chris Green wrote:
>> > I read my mail (via ssh) on quite a variety of devices, one is an
>> > Android phone running termux which has rather short lines which
>> > truncate much of the subject in index view.
>> >
>> > I could rearrange the index_format but that would change it for all my
>> > viewing devices and I don't really want to do that, and anyway I'd
>> > still lose some information.
>>
>> What about a macro or shortcut to toggle between different settings?
>>
>That's possible but it's just one more thing that one has to to
>manually which isn't really necessary.
I always invoke via a script (named "+") which has assorted
figure-it-out logic before invoking mutt. You could sniff the terminal
size and choose a narrower index_format for narrow terminals. (_And_
bind that to a keyboard toggle macro as well if you wanted.)
I've got a ttysize script which does this:
stty -a </dev/tty \
| sed -n '
s/.* rows \([0-9][0-9]*\); columns \([0-9][0-9]*\).*/\2 \1/p
t
s/.*; *\([0-9][0-9]*\) rows; *\([0-9][0-9]*\) columns.*/\2 \1/p
t'
but I'm sure there must be a more direct way.
Anyway, given the tty width you could make a choice about index_format.
Cheers,
Cameron Simpson <cs at cskk.id.au>
More information about the Mutt-users
mailing list