Skip to content

abbr: Warn when -U is given #9475

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

Merged
merged 1 commit into from
Jan 14, 2023
Merged

Conversation

faho
Copy link
Member

@faho faho commented Jan 14, 2023

This prints a warning to stderr and then still does the thing.

Because of the error trailer, it points to the abbr help page.

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
  • Wording? I tried to keep it reasonably general so it stands a chance of being reused, maybe something more specific is useful?
  • This can now warn on every startup, if you have abbr -U in your config.fish. I don't believe there's anything better we can do (we don't want to store a universal variable or write a file to mark that we've errored)

This prints a warning to stderr and then still does the thing.

Because of the error trailer, it points to the abbr help page.
@faho faho added this to the fish 3.6.1 milestone Jan 14, 2023
@faho
Copy link
Member Author

faho commented Jan 14, 2023

The big problem here is that it has no chance of warning in what might be the most common case - abbr without an explicit scope (which was an implicit universal), so I'm not sure this is worth it.

@ridiculousfish ridiculousfish self-requested a review January 14, 2023 20:57
Copy link
Member

@ridiculousfish ridiculousfish left a comment

Choose a reason for hiding this comment

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

This can't hurt at least.

@faho faho merged commit da0c640 into fish-shell:master Jan 14, 2023
@faho faho deleted the abbr-warn-universal branch January 14, 2023 21:27
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 15, 2024
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.

2 participants