Giter VIP home page Giter VIP logo

Comments (10)

aellwein avatar aellwein commented on May 21, 2024 2

@albertito I could try to implement this feature, if you welcome any contributions.

from chasquid.

albertito avatar albertito commented on May 21, 2024 2

This is now implemented in the next branch, commit f303e43 (it might be rebased in the future).

I'll leave it there for now so it gets more exposure and testing, and then move it to master for inclusion in the next release. I'll leave this issue open until then.

In the meantime, please comment further if you have any suggestions or ideas regarding this feature.

Thanks a lot!

from chasquid.

albertito avatar albertito commented on May 21, 2024 1

I agree this would be a useful thing to support, I'll leave this open to track that feature request :)

Thanks!

from chasquid.

albertito avatar albertito commented on May 21, 2024 1

Of course! Contributions are always welcome :)

I'll be slow to respond for the next couple of weeks, but will be happy to look at this then (sorry for the bad timing!).

I have to let you know you, though, that implementing this might be trickier than it looks because of how aliases are implemented internally. A non-matching lookup returns the given address, so that would have to be adjusted, but to do that some of the internal recursion logic may have to change.

If you find time to send a patch/make a pull request, that would be most welcome! Other than that, I'll give it a try in about two weeks.

Thanks again!

from chasquid.

albertito avatar albertito commented on May 21, 2024 1

Of course, thanks a lot for the patch! Sorry I've been slow to review, I came back earlier this week but it's been difficult to find the time for it. I will review the patch this weekend.

Thanks again!

from chasquid.

albertito avatar albertito commented on May 21, 2024 1

Just FYI, and for discoverability: discussion about catch-all is pretty much happening on the pull request #24 .

I'll put a summary here later for reference, but for now let's centralize the discussion in #24 :)

from chasquid.

albertito avatar albertito commented on May 21, 2024 1

The patch for catch-all aliases is now in the master branch, and will be included in the next release.

Thanks again!

from chasquid.

albertito avatar albertito commented on May 21, 2024

At the moment, catch-all isn't supported directly in the aliases file, although I think it's a reasonable feature request.

In the meantime, this is doable via alias hooks. It's not very straightforward, because the output of the hook is added to the results from the file, so you'd have to know which ones already resolve naturally. But it can be done.

Does this help?

Thanks!

from chasquid.

aellwein avatar aellwein commented on May 21, 2024

Thanks @albertito,

this definitely helps with my setup, i need to put some logic into the alias hook.
I also think this would be a great feature to support out-of-the-box.

Maybe some syntax like:

# here goes the catch-all rule 
_ : someuser

Thanks for the help!

from chasquid.

aellwein avatar aellwein commented on May 21, 2024

@albertito if you find time, the pull request contains basic implementation. I'd be happy if you could review it.

from chasquid.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.