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

C/C++ source/header files support #27

Open
marcov opened this issue Oct 29, 2019 · 3 comments
Open

C/C++ source/header files support #27

marcov opened this issue Oct 29, 2019 · 3 comments

Comments

@marcov
Copy link

marcov commented Oct 29, 2019

Any plan to support alternate of C/C++ source code - header files?
E.g.:

$ alt ./foo/bar/faz.c
./foo/bar/faz.h

$ alt ./fizz/bang.hpp
./fizz/bang.cpp
@ulidtko
Copy link

ulidtko commented Dec 30, 2019

+1, I gave alt a try hoping to get exactly this behavior.

Perhaps, even slightly generalized: I'd love to be able to cycle through same-basename files of whatever differing extensions, e.g.:

  • Cargo.tomlCargo.lockCargo.toml
  • FooDoc.mdFooDoc.htmlFooDoc.md
  • watched_template.j2watched_template.json

... etc, etc. This has gazillion handy uses.


On closer look, this isn't what's happening here:
https://github.com/uptech/alt/blob/4575feb0727c52a0920aeb79056304a86304c53c/src/main.rs#L110-L117

Line 114 filters out candidates having similar is_test_file-ness; which is unfortunate.

Will you guys at @uptech be welcoming a patch which implements the above (without, of course, breaking the already working test/impl flow) ?

@drewdeponte
Copy link
Owner

Yes, we would welcome a patch.

@ulidtko The original intent was for it to be general like this. The filter on tests files etc was intended to just be a performance improvement significantly limiting the similarity comparisons that had to be done.

So if we can figure out a way to do this while still keeping the performance and still supporting the other use cases. Yeah I think we would want to support this use case.

@drewdeponte
Copy link
Owner

I just released a new major version of this, v4.0.0 which I believe should help this scenario.

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

3 participants