Re: [PATCH] Fix \H: Use getaddrinfo to get full hostname

2019-07-24 Thread Chet Ramey
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 retur

Re: [PATCH] Fix \H: Use getaddrinfo to get full hostname

2019-07-24 Thread L A Walsh
On 2019/07/24 07:38, Thomas Deutschmann wrote: > Can you tell me more about your system and how you (your administrator) > set up your system so that hostname will return FQDN? > My linux box has 2 interfaces, internal & external, with different domain names on each. While hostname and hostname

Re: [PATCH] Fix \H: Use getaddrinfo to get full hostname

2019-07-24 Thread Thomas Deutschmann
On 2019-07-24 17:32, Greg Wooledge wrote: > Your perspective is too limited. Linux-based systems are very popular, > but they're not the entire Unix world. > > [...] > > There is nothing "wrong" about this configuration. I don't like it, > and you clearly don't like it, but our opinions only ma

Re: [PATCH] Fix \H: Use getaddrinfo to get full hostname

2019-07-24 Thread Greg Wooledge
On Wed, Jul 24, 2019 at 05:23:27PM +0200, 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 t

Re: [PATCH] Fix \H: Use getaddrinfo to get full hostname

2019-07-24 Thread Thomas Deutschmann
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

Re: [PATCH] Fix \H: Use getaddrinfo to get full hostname

2019-07-24 Thread Greg Wooledge
On Wed, Jul 24, 2019 at 04:38:06PM +0200, Thomas Deutschmann wrote: > Can you tell me more about your system and how you (your administrator) > set up your system so that hostname will return FQDN? It's common outside the Linux world. # hostname minea.eeg.ccf.org # uname -a HP-UX minea B.11.11 U

Re: [PATCH] Fix \H: Use getaddrinfo to get full hostname

2019-07-24 Thread Chet Ramey
On 7/24/19 10:38 AM, Thomas Deutschmann wrote: > On 2019-07-24 16:27, Chet Ramey wrote: >> Thanks for the patch. This is system-dependent: there are systems, like >> mine, where `hostname' returns the system's FQDN. It all depends on the >> administrator's choices. > > Can you tell me more about y

Re: [PATCH] Fix \H: Use getaddrinfo to get full hostname

2019-07-24 Thread Thomas Deutschmann
On 2019-07-24 16:27, Chet Ramey wrote: > Thanks for the patch. This is system-dependent: there are systems, like > mine, where `hostname' returns the system's FQDN. It all depends on the > administrator's choices. Can you tell me more about your system and how you (your administrator) set up your

Re: [PATCH] Fix \H: Use getaddrinfo to get full hostname

2019-07-24 Thread Chet Ramey
On 7/24/19 9:58 AM, Thomas Deutschmann wrote: > At the moment, \h and \H used in prompt PS1 or PS2 will actually return > the same value while manpage claims that \h should return hostname up to > the first '.' (like `hostname`) and \H should return full hostname (like > `hostname -f`). Thanks for

[PATCH] Fix \H: Use getaddrinfo to get full hostname

2019-07-24 Thread Thomas Deutschmann
At the moment, \h and \H used in prompt PS1 or PS2 will actually return the same value while manpage claims that \h should return hostname up to the first '.' (like `hostname`) and \H should return full hostname (like `hostname -f`). This commit will make bash use the same API like hostname comman