mirror of
https://github.com/initialcommit-com/git-sim.git
synced 2026-04-27 03:25:53 +03:00
[GH-ISSUE #3] Tilde expansion not supported #2
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/git-sim#2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @anothermh on GitHub (Jan 22, 2023).
Original GitHub issue: https://github.com/initialcommit-com/git-sim/issues/3
Tilde expansion is not supported. For example, consider the following command:
The expectation is that
media-dirwill map to$HOME/temp, for example/Users/foo/temp. Instead it maps to the current directory and creates a sub-directory with the literal name~, e.g../~/temp:This was tested on macOS using both ZSH and fish for the shell, using python 3.11.1.
The problem appears to be here:
github.com/initialcommit-com/git-sim@c2effc2669/git_sim/main.py#L79Using
os.path.expanduserwill allow tilde expansion.@initialcommit-io commented on GitHub (Jan 23, 2023):
Lol whoops, good catch. Thanks for finding the exact location in the codebase and suggesting a solution! Any chance you want to submit a pull request for it? :D