[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#15425: mktemp - conflicting options affected by ENV
From: |
Pádraig Brady |
Subject: |
bug#15425: mktemp - conflicting options affected by ENV |
Date: |
Sun, 06 Oct 2013 18:10:06 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 |
On 09/26/2013 01:59 PM, Pádraig Brady wrote:
> On 09/26/2013 05:36 AM, Jim Meyering wrote:
>>> I'll push this soon, unless there are objections
>>> to the above "undeprecation" of -p.
>>
>> Go for it. That seems best. Thank you.
>
> That -p = --tmpdir aspect is OK.
>
> But on consideration, erroring on -p,-t is too harsh.
> Really -t is just a mode to operate in,
> i.e. enforce no '/' in template, and give precedence
> to TMPDIR over --tmpdir
> Hopefully the attached documentation only patch
> suffices to clear things up.
>
> BTW I noticed this variation which could be
> used to generate passwords or something:
>
> $ mktemp -u -t -p '' XXXXXXXX
> L5awccB1
>
> However without -t, '/tmp/' is inserted.
> I'm inclined to change to not output '/tmp/' here?
>
> $ mktemp -u -p '' XXXXXXXX
> /tmp/L5awccB1
Actually the best way to generate random chars like the above
is to avoid -p entirely. So I've made -t consistent and
output /tmp/... in the above case.
Also I matched the -q option up with the documentation.
The documented functionality made sense, which was to
suppress only I/O errors, but the existing code suppressed
almost all errors, including most usage errors.
So I fixed that up in a second patch.
Both updated patches are attached,
and already pushed.
thanks,
Pádraig.
mktemp-match-docs.patch
Description: Text Data
- bug#15425: mktemp - conflicting options affected by ENV,
Pádraig Brady <=