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

Reset the read byte limit to the default when unset #9129

Merged
merged 1 commit into from
Aug 9, 2022

Conversation

faho
Copy link
Member

@faho faho commented Aug 9, 2022

This used to be kept, so e.g. testing it with

fish_read_limit=5 echo (string repeat -n 10 a)

would cause the prompt and such to error as well.

Also there was no good way to get back to the default value
afterwards.

TODOs:

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

This used to be kept, so e.g. testing it with

    fish_read_limit=5 echo (string repeat -n 10 a)

would cause the prompt and such to error as well.

Also there was no good way to get back to the default value
afterwards.
@faho faho added the bug Something that's not working as intended label Aug 9, 2022
@faho faho added this to the fish 3.6.0 milestone Aug 9, 2022
@@ -299,6 +305,8 @@ static void handle_read_limit_change(const environment_t &vars) {
} else {
read_byte_limit = limit;
}
} else {
read_byte_limit = DEFAULT_READ_BYTE_LIMIT;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice fix, LGTM.
In future we should probably get rid of most global variables but that doesn't seem relevant now.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, definitely, this thing is super janky - and how exactly would that work with multiple parsers?

@faho faho merged commit b89249d into fish-shell:master Aug 9, 2022
@faho faho deleted the reset-byte-limit branch September 11, 2022 08:05
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something that's not working as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants