Skip to content
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

Improvements to the installation documentation #24

Closed
iluwatar opened this issue Aug 11, 2015 · 15 comments
Closed

Improvements to the installation documentation #24

iluwatar opened this issue Aug 11, 2015 · 15 comments

Comments

@iluwatar
Copy link

I was using Lubuntu 14.04 and according to the documentation I should

Edit your ~/.bash_profile or ~/.profile and add the following to the top:

However, this does not work. I needed to edit my .bashrc file to make it work. Also, the documentation does not mention that after cloning the repository you should make the scripts executable with chmod command.

@srvanrell
Copy link

I agree with you. The same happened to me about .bashrc on Ubuntu 14.04.
Also I'm not sure but export doesn't seems to be permanent.
El 12/08/2015 00:21, "Ilkka Seppälä" [email protected] escribió:

I was using Lubuntu 14.04 and according to the documentation I should

Edit your ~/.bash_profile or ~/.profile and add the following to the top:

However, this does not work. I needed to edit my .bashrc file to make it
work. Also, the documentation does not mention that after cloning the
repository you should make the scripts executable with chmod command.


Reply to this email directly or view it on GitHub
#24.

@jimeh
Copy link
Owner

jimeh commented Aug 11, 2015

@iluwatar Sorry for the confusion, I'll have a closer look at Ubuntu's shell init setup and update the readme as needed. I'm not sure why you'd need to make the files executable though, as they're just loaded by bash, and never directly executed.

@srvanrell What kind of issues have you had with the export statement? Seems a bit strange that it wouldn't work, so I'm quite curious :)

@lethosor
Copy link
Contributor

.bash_profile is typically run only in login shells, and .bashrc in other shells - depending on your terminal emulator (or distro?), new windows/tabs may or may not start login shells, and shell instances invoked with bash (i.e. from another shell) should be non-login shells and run .bashrc.

@jimeh
Copy link
Owner

jimeh commented Aug 11, 2015

@lethosor That makes sense. I've been handicapped by OSX always loading the .profile when starting a new shell, regardless of if it's a new window/tab/app/whatever... lol

@srvanrell
Copy link

@jimeh export works properly. Always. I meant that when I open a new terminal (without rebooting) the earlier export execution (in another terminal) don't take effect. May be that's the expected way. I'm not familiar with export so could be that I'm wrong.

Let me restart the question. How many times and where should the export command be executed to get git-aware-prompt always working?

@lethosor
Copy link
Contributor

export only works on a per-shell basis. If you want to make git-aware-prompt work when .bashrc is run but not .bash_profile, you can add your configuration to .bashrc as well, add source ~/.bash_profile to .bashrc (which will (re-)run everything in .bash_profile, of course, including any $PATH settings you might have), or create a separate shell script with your git-aware-prompt settings and run it from .bash_profile and .bashrc.

@srvanrell
Copy link

@lethosor thanks for your clarification! I've added to bashrc but it was
just trial and error. It's good to know the right way.

export only works on a per-shell basis. If you want to make
git-aware-prompt work when .bashrc is run but not .bash_profile, you can
add your configuration to .bashrc as well, source ~/.bash_profile to
.bashrc (which will (re-)run everything in .bash_profile, of course,
including any $PATH settings you might have), or create a separate shell
script with your git-aware-prompt settings and run it from .bash_profile
and .bashrc.


Reply to this email directly or view it on GitHub
#24 (comment)
.

@jkwuc89
Copy link

jkwuc89 commented Aug 12, 2015

I was able to get this working on my Mac by putting everything inside .bashrc. Also, thanks to @iluwatar for pointing out making the scripts executable after cloning the repo.

@lethosor
Copy link
Contributor

You shouldn't have to make them executable if you're sourcing them, though - are you running the scripts directly?

@jkwuc89
Copy link

jkwuc89 commented Aug 12, 2015

@lethosor You are correct. I removed the executable permission and all continues to work as expected.

@srvanrell
Copy link

On Debian .profile lines specified works but they must be at the bottom of the file, not at the top. At least this work for me.

@jimeh
Copy link
Owner

jimeh commented Aug 15, 2015

It seems like what actually works varies quite a bit between OS/distro. I'll try to expand on the installation instructions so they're a bit more informative and helpful than a single sentence.

@edwinksl
Copy link
Contributor

edwinksl commented Jan 1, 2016

I can confirm for Ubuntu 15.10 that we need to use the instructions on .bashrc instead of .profile.

@LaiaPR
Copy link

LaiaPR commented Jan 13, 2016

Hi!
I also can confirm that I need to put it on .bashrc on Ubuntu 14.04.1 to get it working. I am using Terminator.

Can you please update the README?

@edwinksl
Copy link
Contributor

Just opened a PR #31 for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants