[neomutt-users] "mutt -e <command>" does not do as documented
f.a at 31c0.net
Mon Jun 5 16:02:21 CEST 2017
On Mo, 05 Jun 11:56:16 +0100
Richard Russon <rich at flatcap.org> wrote:
thank you for your response(s) and being even more clear than I was.
>You have the same problem as Xu -- The documentation.
I don’t think so, I’ve expected the results of my examples. My problem
seems to be that I was too vague in my response to Xu (see below).
>> But using other examples:
>> $ echo -e 'lua mutt.print("hello from mutt.rc")\n' > /tmp/mutt-test.rc
>> $ mutt -F /tmp/mutt-test.rc -e 'lua mutt.print("hello from cmdline")' -B
>> prints out in the right order:
>> $ hello from mutt.rc
>> $ hello from cmdline
>This is as expected.
>The config files are read (with the side-effect of printing "hello from mutt.rc"
>Then, the command line options are executed, printing "hello from cmdline"
I was unclear or used incorrect spelling — I had wrote this better as
“prints the correct/expected order of […]”?
Your advise to Xu using a folder-hook, is another thing that I should
have been referred to. I’m using (as some of my mailbox defaults):
set collapse_unread = no
set uncollapse_jump = no
folder-hook . 'push <collapse-all><current-bottom>'
because after closing the pager, often only some messages are listed in
top of the index view (like one has invoked <current-top> on last-entry)
even if there are dozens exists.
>> Also variable initialisation like:
>Variable is first set to "hello from mutt.rc"
>The overwritten with "hello from cmdline"
>The command line is "more important" than the config files,
>so it needs to be processed afterwards.
>Hope that makes sense.
Yes, like the priority order of nearly every application using
configuration files and providing command line parameter:
command line switches -> user-based config -> system-wide config
Fortunately Mutt/Neomutt behaves the same way within configuration files
and doesn’t only apply the first obtained setting like e.g. OpenSSH.
>Rich / FlatCap
More information about the neomutt-users