fix: show folder name instead of full path on MINGW (Windows)#19
Merged
glauberlima merged 1 commit intomainfrom Feb 23, 2026
Merged
fix: show folder name instead of full path on MINGW (Windows)#19glauberlima merged 1 commit intomainfrom
glauberlima merged 1 commit intomainfrom
Conversation
…ility On MINGW, Claude Code sends workspace.current_dir as a native Windows path (e.g. C:\projetos\meu-projeto). The previous ##*/ expansion only strips up to the last forward slash, leaving the full path unchanged. Normalize backslashes to forward slashes before extracting the basename so the directory component shows only the folder name on all platforms.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
workspace.current_dirarrives as a native Windows path with backslashes (e.g.C:\projetos\meu-projeto)get_dirname()used${1##*/}which only strips up to the last/— with no/present, the full path was returned unchanged\→/before extracting the basename, making it work on all platforms with zero impact on Linux/macOS pathsTest plan
get_dirname unix path—/home/user/my-project→my-projectget_dirname windows path (MINGW)—C:\projetos\meu-projeto→meu-projetoget_dirname windows forward slashes—C:/projetos/meu-projeto→meu-projeto