-
Notifications
You must be signed in to change notification settings - Fork 424
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: show full hostname #254
Conversation
Merge changes from the develop branch: - many fixes, in particular for MacOS X (battery) - many speed improvments (Mercurial, Subversion) - many reliability improvments (SHORTEN_PATH feature) Ready for a release.
… into feature/showDomain Conflicts: test.sh
Also changed the test.sh to reflect new feature
Please never merge the branches from the main repo to your own feature branches. This pull request is a mess now. |
@dolmen My implementation won't work for @berserck because I am using Bash's \H which he claims does not work on 100% of platforms. You have to make a decision about whether or not you want to 100% rely on the underlying shell's prompt options or if you want to go "outside" the box if the prompt's options fail. In other words, in my opinion, if \H doesn't work on your platform, you need to file a bug against the prompt on your platform because it should work. That's why I implemented it this way. Sorry I didn't write any tests. I am not so good with testing. |
that is correct, feature #277 will not work for me. I found out why the option \H does not work for me and it has to do with my setup, it is not a bash problem, but it seems to be one of those things that will not change soon (more information in http://serverfault.com/questions/296970/bash-prompt-on-ubuntu-fqdn-h-same-as-hostname-h) the option you can go either way. |
Thanks for the feedback. I'll try to do a mix of the two implementations. |
Added possibility to show domain if host name is shown.
I've added the option LP_DOMAIN to show the domain if the host name is shown.
I also edited the test.sh file to test for new feature.
I'm using the command
hostname -f
instead of the\H
(for bash) and%M
(for zsh)because I noticed that the
\H
is bash is not the same in all systems (zsh is coherent):In macos (bash 3.2.48(1)-release) and freeBSD(bash 4.2.45(0)-release) :
In linux: SLC6 (bash: 4.1.2(1)-release), debian(bash:4.2.37(1)-release ) and ubunto(bash: 4.2.25(1)-release) ):