this post was submitted on 27 Jun 2024
1 points (100.0% liked)
Rust
5974 readers
14 users here now
Welcome to the Rust community! This is a place to discuss about the Rust programming language.
Wormhole
Credits
- The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Ugh yeah that's infuriating on Github search too. Obviously if I'm searching for some identifier I don't want 10 pages of results in
/tests
.How hard can it be? Just weight anything with
test
in the file path lower than everything else. Job done.You two bring shame to the programming community.
Just ripgrep cargo expanded output for f**** sake.
What are you talking about?
What part are you struggling with?
The ripgrep (
rg
) part, or thecargo expand
part?I know what both of those are and how to use them. But they are entirely relevant to the thread. Did you comment in the wrong place?
Not sure how what I write is this confusing to you.
test
.test
is not necessarily all tests.cargo expand
gives you options for correctly and coherently expanding Rust code, and doesn't expand tests by default.rg
was half a joke since it's Rust's grep. You can just pipecargo expand [OPTIONS] [ITEM]
output tovim '+set ft=rust' -
orbat --filename t.rs
and search from there.Ok cool but how does that help when I'm searching a non-Rust project via the GitHub web search interface? I don't know why I'd want to search
cargo expand
output anyway. Using that just to avoid searching tests is a super ugly hack.You're not smart. You're not special. Nobody is giving you a medal because you know a workaround to a developer not implementing a feature request after five years, especially when said feature IS ALREADY IMPLEMENTED in a different language in the same IDE.
So again, what does your response have to do with how an IDE works? Nothing. It has nothing to do with it, you're posting purely to jerk yourself off.
My post was a showcase of why there is no substitute for knowing your tools properly, and how when you know them properly, you will never have to wait for 5 minutes, let alone 5 years, for anything, because you never used or needed to use an IDE anyway.
This applies universally. No minimum smartness or specialness scores required.