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

Should get the OS name from os-release(5) #39

Open
LukeShu opened this issue Oct 10, 2016 · 0 comments
Open

Should get the OS name from os-release(5) #39

LukeShu opened this issue Oct 10, 2016 · 0 comments

Comments

@LukeShu
Copy link

LukeShu commented Oct 10, 2016

Currently the distro module gets the OS name by guessing Arch Linux if /etc/pacman.conf exists, and falling back to uname -o otherwise.

I propose that (per man 5 os-release) it check whichever of /etc/os-release and /usr/lib/os-release, is found first; and use PRETTY_NAME, fall back to NAME, fall back to ID, then finally fall back to uname -o.

Relatedly, having the default color be os-release:ANSI_COLOR wouldn't be a bad idea either.

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

1 participant