unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: David Edmondson <dme@dme.org>
To: Bijan Chokoufe <bijan@chokoufe.com>, Tomi Ollila <tomi.ollila@iki.fi>
Cc: notmuch@notmuchmail.org
Subject: Re: [PATCH] config: Expand ~ to $HOME
Date: Wed, 11 May 2016 21:11:39 +0100	[thread overview]
Message-ID: <m2mvnw8idg.heart-of-gold@dme.org> (raw)
In-Reply-To: <CAOsAL0rr2FdG1gPOcaMV_iqORRrXAKYc8wA_YWWjC+TTibar3w@mail.gmail.com>

On Wed, May 11 2016, Bijan Chokoufe wrote:

> so what would be the spec for handling ~user?

Look up "user" in the password file and replace "~user" with their home
directory. See getpwnam().

> As Tomi pointed out ~foo will point to different folders if set by user
> 'foo' or by user 'bar'.

~foo means "the home directory of user foo", independent of who is using
it, so it will be the same when used by both user foo and user bar.

> To what folder should it point and where do I get this information?
>
> David Edmondson <dme@dme.org> schrieb am Di., 10. Mai 2016 um 10:22 Uhr:
>
>> On Mon, May 09 2016, Bijan Chokoufe Nejad wrote:
>>
>> >> ~user is ~ in case you're 'user' -- except that now that I think of it
>> >> ~user could read home directory from /etc/passwd and not using $HOME.
>> >> If you're 'eve', then ~alice should definitely be different than ~
>> >
>> > OK I see. I never used ~user instead of ~ and don't see any advantage in
>> using
>> > ~user but good to know it's there.
>>
>> A solution that supports ~ but not ~user seems incomplete.
>>

  reply	other threads:[~2016-05-11 20:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-08 15:49 [PATCH] config: Expand ~ to $HOME Bijan Chokoufe Nejad
2016-05-08 16:47 ` Tomi Ollila
2016-05-08 18:50   ` Bijan Chokoufe
2016-05-09  7:54     ` Tomi Ollila
2016-05-09  8:40       ` Tomi Ollila
2016-05-09 21:57       ` Bijan Chokoufe Nejad
2016-05-10  8:22         ` David Edmondson
2016-05-11 19:17           ` Bijan Chokoufe
2016-05-11 20:11             ` David Edmondson [this message]
2016-05-11 20:16               ` Tomi Ollila

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=m2mvnw8idg.heart-of-gold@dme.org \
    --to=dme@dme.org \
    --cc=bijan@chokoufe.com \
    --cc=notmuch@notmuchmail.org \
    --cc=tomi.ollila@iki.fi \
    /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).