implement a prompt_hostname function#3482
implement a prompt_hostname function#3482krader1961 merged 3 commits intofish-shell:masterfrom krader1961:fish-prompt-hostname
Conversation
Standardize how the host name is included in the prompts that do so. Fixes #3480
|
Did you forget to commit the function? |
There was a problem hiding this comment.
fish: Unknown command 'fish_prompt_hostname'
|
Should this maybe be |
Oops, yes, stupid |
|
Is splitting on '.' from (I genuinely have no idea.) |
Agreed. Changed. |
It's supposed to be since the definition of |
|
In no case can the FQDN be something like "www.mysite.com" and |
|
If by simple host name you mean what is returned as the |
First of all, that's what we currently do, so there's no regression here. Secondly, this allows us to fix it in one place if we ever figure out a better solution. Thirdly: Probably not. This is probably one of those things where there's a super-rare super-complicated edge case that some people get really passionate about (maybe some way to make it recursive, or dependent on locale?). We'll get an issue and then we can work it out. Or they can just override the function. |
We used to use # Just calculate these once, to save a few cycles when displaying the prompt
if not set -q __fish_prompt_hostname
set -g __fish_prompt_hostname (hostname -s)
end |
|
Yeah, but in the other prompts we didn't. This was inconsistent. |
|
It looks like most of the sample prompts are not using this. |
|
Er, I'm totally mistaken. I was on Integration_2.4.0 and thought I was on master. And I mistakenly pushed two commits I shouldn't have. Reverting. |
Quick sanity check please that I didn't introduce a typo.
Standardize how the host name is included in the prompts that do so.
Fixes #3480