rust-lang / rust-lang/glob

Globbing drops Component::CurDir

Open
#70 0 comments 0 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.