chrisant996 / clink-flex-prompt

Flex prompt for Clink
MIT License
135 stars 17 forks source link

Add ability to show Azure Cloud information #68

Closed eblis closed 1 month ago

eblis commented 1 month ago

Would be nice to have a module to show Azure Cloud (az cli) information, like name, tenant id, etc.

eblis commented 1 month ago

Added a very crude implementation here https://github.com/chrisant996/clink-flex-prompt/pull/69

chrisant996 commented 1 month ago

It doesn't seem that "crude" to me. 🙂

I agree that the JSON handling isn't great, though.

I don't currently have a way to test or support this, so I'm cautious about including it as built into clink-flex-prompt.

The intent of clink-flex-prompt has always been that custom modules can be added without being built into it. For example, I have a few custom modules for my work computers, which are not built in.

It could be in a separate flexprompt_az.lua file, and could be in a separate repo, for example.

eblis commented 1 month ago

I think multiple people would want support for azure, Aws, etc.

You should be able to sign up for a trial version of azure and then be able to test azure cli, depends if you really want to invest the time or not.

I think a proper version would let you select which field(s) to show, maybe you want the tenant id, maybe you want the name, etc. I only wanted the name and the connected/logged in status.

I can add a few screenshots of how it looks when connected and when disconnected tomorrow when I'm at the computer again.

chrisant996 commented 1 month ago

I think multiple people would want support for azure, Aws, etc.

I agree. But that doesn't mean I have to be the one to write it, test it, publish it, maintain it, etc.

You should be able to sign up for a trial version of azure and then be able to test azure cli, depends if you really want to invest the time or not.

I think a proper version would let you select which field(s) to show, maybe you want the tenant id, maybe you want the name, etc. I only wanted the name and the connected/logged in status.

My point is, if I merge the PR, then that implicitly signs me up as maintainer. Bug reports will come to me.

(Plus, you just listed some extra feature requests you'd like me to implement. But I don't use Azure. I'm not going to spend my limited time on this planet in that way. 🙃)

Merging the PR adds a lot more cost than just clicking a button to merge the pull request. I don't want to sign up for that ongoing time cost.

I carefully designed clink-flex-prompt so that custom modules can be added by scripts that aren't distributed with clink-flex-prompt. I recommend to distribute this separately from clink-flex-prompt.

I would be very happy to maintain a list of repos with additional custom prompt modules, and include that prominently in the README file.

eblis commented 1 month ago

I understand. I'll create my own repository with the custom module(s), just have to find the time 😄