Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #15238
| From | Chet Ramey <chet.ramey@case.edu> |
|---|---|
| Newsgroups | gnu.bash.bug |
| Subject | Re: [PATCH] Fix \H: Use getaddrinfo to get full hostname |
| Date | 2019-07-24 14:45 -0400 |
| Message-ID | <mailman.2167.1563993932.2688.bug-bash@gnu.org> (permalink) |
| References | (1 earlier) <454afb04-c18a-1b82-d869-34539c194b3d@case.edu> <f1f2e8df-5921-b696-686b-de5aec362a25@gentoo.org> <20190724144629.GL1218@eeg.ccf.org> <571d32dc-3ad0-3c00-5d9b-82ace9c041ff@gentoo.org> <912bd73d-ea80-dacd-ade3-7258d6d4ff03@case.edu> |
[Multipart message — attachments visible in raw view] - view raw
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/
Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread
Re: [PATCH] Fix \H: Use getaddrinfo to get full hostname Chet Ramey <chet.ramey@case.edu> - 2019-07-24 14:45 -0400
csiph-web