mirror of
https://github.com/BurntSushi/ripgrep.git
synced 2025-07-31 20:21:59 -07:00
Change the default output of --files to elide './'.
This is kind of a ticky-tack change. I do think ./ as a prefix is reasonable default, *but* we strip ./ when showing search results, so it does make sense to be consistent. Fixes #21.
This commit is contained in:
@@ -703,11 +703,9 @@ fn files() {
|
||||
cmd.arg("--files");
|
||||
let lines: String = wd.stdout(&mut cmd);
|
||||
if cfg!(windows) {
|
||||
assert!(lines == "./dir\\file\n./file\n"
|
||||
|| lines == "./file\n./dir\\file\n");
|
||||
assert!(lines == "dir\\file\nfile\n" || lines == "file\ndir\\file\n");
|
||||
} else {
|
||||
assert!(lines == "./file\n./dir/file\n"
|
||||
|| lines == "./dir/file\n./file\n");
|
||||
assert!(lines == "file\ndir/file\n" || lines == "dir/file\nfile\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user