Globbing drops Component::CurDir
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 596
- Forks
- 93
- PR merge metrics
- No merged PRs in 30d
Description
The behavior of globbing in the shell (the two I have specifically tested are dash and zsh) differs from the behavior of glob given the following program:
extern crate glob;
fn main() {
let mut args = ::std::env::args();
args.next();
let path = args.next().unwrap();
for file in glob::glob(&path).unwrap() {
let file = file.unwrap();
print!("{} ", file.display());
}
}
With an input of ./*, the program gives something like README.md Contributing.md whereas echo ./* gives ./README.md ./Contributing.md.
Contributor guide
No contributing guide indexed for this repository
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
Start with the Rust example in the issue and compare glob::glob("./*") with shell expansion from dash and zsh. Trace how the glob results represent the current-directory component; done means preserving the ./ prefix so the library output matches shell behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100