From: David Bremner <david@tethera.net>
To: Pieter Praet <pieter@praet.org>
Cc: Notmuch Mail <notmuch@notmuchmail.org>
Subject: Re: [PATCH] test: cli: getting/setting/removing config values
Date: Sat, 14 Jan 2012 08:16:30 -0400 [thread overview]
Message-ID: <87aa5qjx7l.fsf@zancas.localnet> (raw)
In-Reply-To: <1326531476-14556-1-git-send-email-pieter@praet.org>
On Sat, 14 Jan 2012 09:57:56 +0100, Pieter Praet <pieter@praet.org> wrote:
> Full test coverage for getting, setting and removing options in
> notmuch(1)'s config file ($NOTMUCH_CONFIG or $HOME/.notmuch-config).
>
> ---
> +
> +# FIXME: Not the most robust nor portable solution here...
> +# Especially `hostname --domain' may have unwanted effects on
> +# some platforms, e.g. setting your hostname to "--domain" ;)
> +fallback_name="$(grep $(id -un) /etc/passwd | cut -d ":" -f 5 | cut -d "," -f 1)"
> +fallback_email="$(id -un)@$(hostname).$(hostname --domain)"
I'm not sure how portable it is, but maybe dnsdomainname would at least
have better failure modes.
I also wondered about using getent instead of grep.
d
next prev parent reply other threads:[~2012-01-14 12:16 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-10 17:50 [RFC PATCH] cli: factor out config handling code to get/set lists David Bremner
2011-12-10 18:24 ` Austin Clements
2011-12-10 20:30 ` David Bremner
2011-12-11 16:07 ` [PATCH] " David Bremner
2011-12-11 16:41 ` Dmitry Kurochkin
2011-12-12 18:26 ` David Bremner
2012-01-12 17:26 ` Pieter Praet
2012-01-12 17:30 ` [PATCH] test: cli: getting/setting/removing config values Pieter Praet
2012-01-13 3:42 ` David Bremner
2012-01-14 8:54 ` Pieter Praet
2012-01-14 8:57 ` Pieter Praet
2012-01-14 12:16 ` David Bremner [this message]
2012-01-16 10:31 ` Pieter Praet
2012-01-16 11:37 ` David Bremner
2012-01-16 16:48 ` Pieter Praet
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87aa5qjx7l.fsf@zancas.localnet \
--to=david@tethera.net \
--cc=notmuch@notmuchmail.org \
--cc=pieter@praet.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).