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

normalize_path: Squash leading slashes even without allow_leading #8281

Merged
merged 1 commit into from
Sep 9, 2021

Conversation

faho
Copy link
Member

@faho faho commented Sep 9, 2021

This currently changes builtin realpath with the "-s" option:

builtin realpath -s ///tmp

previously would print "///tmp", now it prints "/tmp".

The only thing "allow_leading_double_slashes" does is allow two
slashes.

This is important for path match, to be introduced in #8265.

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

@faho faho added the bug Something that's not working as intended label Sep 9, 2021
@faho faho added this to the fish 3.4.0 milestone Sep 9, 2021
This currently changes builtin realpath with the "-s" option:

    builtin realpath -s ///tmp

previously would print "///tmp", now it prints "/tmp".

The only thing "allow_leading_double_slashes" does is allow *two*
slashes.

This is important for `path match`, to be introduced in fish-shell#8265.
@faho
Copy link
Member Author

faho commented Sep 9, 2021

Okay, the only use of this is in builtin realpath, all other callsites allow leading double slashes.

So I feel comfortable merging this.

@faho faho merged commit a78d9d8 into fish-shell:master Sep 9, 2021
@faho faho deleted the normalize-leading-slashes branch September 9, 2021 16:41
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 12, 2022
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.

None yet

1 participant