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

math: Add --base option #7496

Merged
merged 1 commit into from Nov 27, 2020
Merged

math: Add --base option #7496

merged 1 commit into from Nov 27, 2020

Conversation

faho
Copy link
Member

@faho faho commented Nov 22, 2020

Currently a bit limited, unfortunately printf's %a specifier is
absolutely unreadable.

So we add hex and octal with 0x and 0 prefixes respectively,
and also take a number but currently only allow 16 and 8.

The output is truncated to integer, so scale values other than 0 are
invalid and 0 is implied.

The docs mention this may change.

TODOs:

  • Changes to fish usage are reflected in user documentation/manpages.
  • Tests have been added for regressions fixed
  • User-visible changes noted in CHANGELOG.rst

Currently a bit limited, unfortunately printf's `%a` specifier is
absolutely unreadable.

So we add `hex` and `octal` with `0x` and `0` prefixes respectively,
and also take a number but currently only allow 16 and 8.

The output is truncated to integer, so scale values other than 0 are
invalid and 0 is implied.

The docs mention this may change.
@faho faho added this to the fish 3.2.0 milestone Nov 22, 2020
@ridiculousfish
Copy link
Member

LGTM!

@faho faho merged commit 5872f45 into fish-shell:master Nov 27, 2020
@faho faho deleted the math-base branch December 6, 2020 14:27
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants