Re: [PATCH 3/3] test: add tests for --profile CLI option

Subject: Re: [PATCH 3/3] test: add tests for --profile CLI option

Date: Mon, 17 Aug 2026 00:05:06 +0300

To: David Bremner, inwit, notmuch@notmuchmail.org

Cc: inwit

From: Tomi Ollila


On Sun, Aug 16 2026, David Bremner wrote:

> inwit <inwit@sindominio.net> writes:
>>  
>> +xdg_config_cli () {
>> +    local dir
>> +    local profile=${1:-default}
>> +    backup_config
>> +    dir="${HOME}/.config/notmuch/${profile}"
>> +    rm -rf $dir
> I wonder if we should have " " around $dir here?
> Basically if $HOME has spaces, the whole build will blow up, but maybe
> extra caution for rm -rf is suitable.

Definitely "$dir" (HOME seldom has spaces (nor $1)). At least it is
good for example.

... but, dir=${HOME}/.config/notmuch/${profile} would have worked
(I am not suggesting to change that, though :D)

Tomi

_______________________________________________
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-leave@notmuchmail.org

Thread: