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.