Skip to content

fix: restore path based parsing in 4.0 #566

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

nnungest
Copy link

@nnungest nnungest commented Mar 6, 2025

This fixes issue 564, where empty directories are returned after upgrading to 4.0.0. This also safely wraps paths.

Description

Restore path based parsing for a variety of _tide_item functions.

Motivation and Context

When a user changes directory into a one that contains, lets say package.json, tide normally picks up the version and prints it on the status line. This stopped working when fish moved to 4.0.0. This restores the previous behavior by checking for directories that are invalid (zero length) and safely wrapping the directories with quotes.

Closes #564

Screenshots (if appropriate)

How Has This Been Tested

I ran this against the make commands list in contributing.

  • I have tested using Linux. [fish 3.7.1] [nixos]
  • I have tested using MacOS. [fish 3.7.1] [fish 4.0.0] [MacOS Sequoia 15.3.1]

Checklist

  • I am ready to update the wiki accordingly. no changes needed
  • I have updated the tests accordingly. no changes needed

@nnungest nnungest requested a review from IlanCosman as a code owner March 6, 2025 04:39
This fixes issue 564 also safely wraps strings for parsing

[564]
@nnungest nnungest force-pushed the fix/parse-parent-dirs branch from 8847853 to 2c0c026 Compare March 6, 2025 04:52
@nnungest
Copy link
Author

nnungest commented Mar 6, 2025

Im not sure if the last 2 checks apply to this PR but im happy to update things if needed.

In this case I don't think the test should be touched as this should keep the same functionality as before intact.

@0xflick
Copy link

0xflick commented Mar 11, 2025

Thanks! this fixed my issue.

Looks like @IlanCosman hasn't been active much recently, but hopefully this makes its way in

ly4096x added a commit to ly4096x/tide that referenced this pull request Mar 14, 2025
ly4096x added a commit to ly4096x/tide that referenced this pull request Mar 14, 2025
* remove _tide_cache_variables

* apply IlanCosman#566

* update makefile

* fix

* fix color

* fix indent
@d0sse
Copy link

d0sse commented Mar 16, 2025

Thanks!

@nextzhou
Copy link

nextzhou commented Apr 1, 2025

Thank you. Hope to merge soon!

@augustocdias
Copy link

It seems the owner is not very active anymore. Is anyone willing to start a fork?

@nnungest-aca
Copy link

It seems the owner is not very active anymore. Is anyone willing to start a fork?

ive since started using starship instead.

@plttn
Copy link

plttn commented Apr 4, 2025

For what it's worth, I've started going through the various PRs here on the fork I created and seeing about getting them merged in.

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.

Some items are not working after fish 4.0 update
9 participants