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

Installation for all users? #23

Open
CRCinAU opened this issue Nov 24, 2018 · 4 comments
Open

Installation for all users? #23

CRCinAU opened this issue Nov 24, 2018 · 4 comments
Labels
enhancement New feature or request

Comments

@CRCinAU
Copy link

CRCinAU commented Nov 24, 2018

Is there any hints / howto on how to install this for all users?

I would get that the source should exist in /etc/profile.d/something

Then install under /usr/local? or /opt?

@CRCinAU
Copy link
Author

CRCinAU commented Nov 26, 2018

For what its worth, I got this running by doing a git clone into /opt.

Then, create file as /etc/profile.d/pureline.sh

if [ -f ~/.pureline.conf ]; then
    source /opt/pureline/pureline ~/.pureline.conf
else
    source /opt/pureline/pureline /opt/pureline/configs/powerline_full_256col.conf
fi

This can probably have a bit more tweaking, but will import the default config if no config is provided. It also allows each user to customise their own prompt.

@chris-marsh
Copy link
Owner

Yep your right, PureLine should have a proper installation method. I'm going to try and commit a bit more time to the project and aim for a feature freeze and stable release. Then it should easier to work on distro packages to install system wide.

@chris-marsh chris-marsh added the enhancement New feature or request label Feb 15, 2021
@max06
Copy link

max06 commented Jul 13, 2023

I've just tried this - with not very much success.

    # source external segments
    local segment_dir
    segment_dir=$(dirname "${BASH_SOURCE[0]}")'/segments'

Sourcing /opt/pureline/pureline fails to load the segments, since ${BASH_SOURCE[0]} points to /etc/profile.d/pureline.sh.

Is there a better way?

(Instead of sourcing 2 files, I just source pureline in the profile script and directly add the configuration content afterwards.)

@max06
Copy link

max06 commented Jul 13, 2023

Nevermind... Adding my config into the profile-script instead of sourcing it was my mistake.

Out of interest... can someone explain me the difference between

source a.sh b.sh

and

source a.sh
source b.sh

? 😅

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

No branches or pull requests

3 participants