[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Fix \H: Use getaddrinfo to get full hostname
From: |
Chet Ramey |
Subject: |
Re: [PATCH] Fix \H: Use getaddrinfo to get full hostname |
Date: |
Wed, 24 Jul 2019 14:45:18 -0400 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 |
On 7/24/19 11:23 AM, Thomas Deutschmann wrote:
> On 2019-07-24 16:46, Greg Wooledge wrote:
>>> I hope you are not talking about putting FQDN into a file which is
>>> expecting hostname only...
>>
>> Yes, many people do precisely that. They configure their systems
>> so the "hostname" command returns an FQDN, as I showed above. (Not
>> my design, not my choice.)
>
> I consider this as misconfiguration. :(
This is how Mac OS X works in an enterprise environment (this one, at
least).
> I can't believe that we somehow encourage people to either do something
> wrong (put FQDN where just non-FQDN is expected and bypass DNS
> mechanism) or use $(hostname -f) in PS1 when they want FQDN.
Users don't "put" the FQDN anywhere. I didn't do anything when setting
up this system. This is my official hostname as set by enterprise DNS.
> Anyway, back to bash:
>
> So you are rejecting this patch, right? Maybe update man page at least
> to clarify that "\H" in contrast to "\h" is supposed to return the same
> value but _unfiltered_?
What does `unfiltered' mean that's different from what the man page says?
I don't see the difference.
I think the current implementation is fine, but you can easily use a shell
variable and expand it in $PS1 if you want something other than what
gethostname() gives you.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/
signature.asc
Description: OpenPGP digital signature
- [PATCH] Fix \H: Use getaddrinfo to get full hostname, Thomas Deutschmann, 2019/07/24
- Re: [PATCH] Fix \H: Use getaddrinfo to get full hostname, Chet Ramey, 2019/07/24
- Re: [PATCH] Fix \H: Use getaddrinfo to get full hostname, Thomas Deutschmann, 2019/07/24
- Re: [PATCH] Fix \H: Use getaddrinfo to get full hostname, Chet Ramey, 2019/07/24
- Re: [PATCH] Fix \H: Use getaddrinfo to get full hostname, Greg Wooledge, 2019/07/24
- Re: [PATCH] Fix \H: Use getaddrinfo to get full hostname, Thomas Deutschmann, 2019/07/24
- Re: [PATCH] Fix \H: Use getaddrinfo to get full hostname, Greg Wooledge, 2019/07/24
- Re: [PATCH] Fix \H: Use getaddrinfo to get full hostname, Thomas Deutschmann, 2019/07/24
- Re: [PATCH] Fix \H: Use getaddrinfo to get full hostname,
Chet Ramey <=
- Re: [PATCH] Fix \H: Use getaddrinfo to get full hostname, L A Walsh, 2019/07/24