[neomutt-users] version output -> Compile/Default Options

Sven Guckes neomutt-lists at guckes.net
Sun Sep 16 21:19:59 CEST 2018


so "neomutt -v" gives you an overview to
everything, including the "Default options".

but there is no special option to display
your neomutt's "Default options" *only*,
so i have used a simple extraction using "sed":

  $ neomutt -v | sed -r -e '1,/^Default options:$/d' -e '/^Compile options:/,$d'
  +attach_headers_color +compose_to_sender +compress +cond_date +debug
  +encrypt_to_self +forgotten_attachments +forwref +ifdef +imap +index_color
  +initials +limit_current_thread +multiple_fcc +nested_if +new_mail +nntp +pop
  +progress +quasi_delete +regcomp +reply_with_xorig +sensible_browser +sidebar
  +skip_quoted +smtp +status_color +timeout +tls_sni +trash

works fairly well and can be aliased easily.  (but
probably only works until the version output changes.)

maybe you just want a *list* of those options, one by each line -
so another substitution with sed makes that easy:

    $ neomutt -v | sed -r \
    -e '1,/^Default options:$/d' \
    -e '/^Compile options:/,$d'  \
    -e 's/[+][a-z_]+/\n&/g'

however, there are leading and trailing spaces to be removed.
we can catch those within the pattern regex
and simply leave them out in the replacement.
add another sed to delete the empty lines:

  $ neomutt -v | sed -r \
   -e '1,/^Default options:$/d'   \
   -e   '/^Compile options:/,$d'  \
   -e 's/ *([+][a-z_]+) */\n\1/g' \
   | sed '/^$/d'

that gives me 30 lines/options.

here's the same for the "Compile options":

 $ neomutt -v | sed -r \
   -e '1,/^Compile options:/d'     \
   -e   '/^MAILPATH/,$d'           \
   -e 's/ *([-+][a-z_]+) */\n\1/g' \
   | sed '/^$/d'

result: 27 lines/options

background: as usual, i am thinking of asking
someone on IRC about his compile options.  and
then the user could easily enter this command:

    /exec -out neomutt-compile-options.sh

and then we'll see all those options on the channel - on *one* line.

anyway, i'm sure it can be improved. anyone? ^^

Sven

-- 
neomutt maillist reminder: please *sign* your messages.
why?  because we can, right?!  :-)
# sign messages for both devel and users mailing lists:
  send-hook "~C neomutt-devel at neomutt.org" "set pgp_autosign"
  send-hook "~C neomutt-users at neomutt.org" "set pgp_autosign"
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 1473 bytes
Desc: not available
URL: <http://mailman.neomutt.org/pipermail/neomutt-users-neomutt.org/attachments/20180916/ddfd7fbc/attachment.sig>


More information about the neomutt-users mailing list