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

Fixed battery conversion #540

Merged
merged 1 commit into from Aug 4, 2015

Conversation

nwinkler
Copy link
Member

@nwinkler nwinkler commented Aug 4, 2015

For battery percentages of 08 and 09 percent, the -le would fail with
an error ("value too great for base"), since the numbers with leading
zeros are treated as octal numbers when using double brackets.

The solution is to force base 10 for the numbers. More details here:
http://stackoverflow.com/a/24777667/1228454

For battery percentages of 08 and 09 percent, the `-le` would fail with
an error ("value too great for base"), since the numbers with leading
zeros are treated as octal numbers when using double brackets.

The solution is to force base 10 for the numbers. More details here:
http://stackoverflow.com/a/24777667/1228454
nwinkler added a commit that referenced this pull request Aug 4, 2015
@nwinkler nwinkler merged commit a418c69 into Bash-it:master Aug 4, 2015
@nwinkler nwinkler deleted the battery-percentage-powerline branch August 4, 2015 09:32
@edubxb
Copy link
Member

edubxb commented Aug 4, 2015

👍

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

Successfully merging this pull request may close these issues.

None yet

2 participants