Cannot recognize `~` in Windows
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 24.1k
- Forks
- 2k
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 365
Description
In powershell, ~ is used to refer to %HOME%.
For example, when running dir ~, it lists all files and folders under %HOME%, which is usually C:\Users\YOUR_USERNAME\.
However, when running for example, rm -rf ~/.cache or ls -a ~, it says:
rm: cannot access '~': No such file or directory
ls: cannot access '~': No such file or directory
Before I used Busybox-w32, which supports the ~ mark. I wish it could recognize it.
Anyway, it can recognize $HOME in powershell, as $HOME is just the absolute path, which can be tested with echo.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce dir ~, rm -rf ~/.cache, and ls -a ~ in PowerShell, then trace how uutils/coreutils receives and interprets the path argument. Compare the stated $HOME behavior with BusyBox-w32's tilde handling; done when the examples resolve ~ to the user's home directory.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell, rust
- Domain
- cli, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100