Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Globbing drops Component::CurDir #70

Open
Arcterus opened this issue Jul 9, 2018 · 0 comments
Open

Globbing drops Component::CurDir #70

Arcterus opened this issue Jul 9, 2018 · 0 comments

Comments

@Arcterus
Copy link

Arcterus commented Jul 9, 2018

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.

@Arcterus Arcterus changed the title Globbing drop Component::CurDir Globbing drops Component::CurDir Jul 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant