Repository navigation
Add support for flyctl - #141
Conversation
To elaborate on this a bit, here's how the flow looks when testing my local build: The command above fails because I don't have Since that doesn't work, I manually edit |
Given Alias resolution when the plugin aliases
Alias resolution when the plugin aliases
Furthermore, the plugin will be more explicit, because it will alias the binary name rather than another alias. This is important to us, because it helps in the transparency of what the plugin executes. Therefore, please use |
No, this is not expected. I'm hoping my reply above will solve both. Please let us know if my above suggestion does not solve this, as we'd have to dig deeper to solve this in that case. |
|
Thanks for reviewing, @SimonBarendse! I have been at this for the last two days but I am stuck. Here's my progress:
Visualization of the command flow: When I add a new alias for But based on your comment here, it sounds like the second alias shouldn't be needed? 🤔 At this point, I am stuck and wanted to share my progress to move forward our discussion. |
Regarding this part, I noticed that I was looking at |
|
There's no issue with the |
Does https://developer.1password.com/docs/cli/config-directories help? |
|
Based on what you're sharing I have a hunch that maybe |
|
It looks like the two commands are two different binaries: I Googled a bit and came across this blog post:
At this stage, my understanding stands that |
|
Hey @arunsathiya :). The |
|
Hey @arunsathiya, is there anything that we can help with, to go forward with this MR? Would love to help get this to the finish line! Let us know! 😄 |
AndyTitu
left a comment
There was a problem hiding this comment.
The current version of this PR lgtm!
|
Just wanted to make a quick note that I've started exploring an option today to support aliases in shell plugin creation flow, and then generate the shell plugin alias in I suggest we hold off on merging the current version because it doesn't actually work for "fly" commands. It does only for "flyctl". |
|
Sounds good, please do let us know if we can help in any way! In the meantime, feel free to mark this PR as 'Draft', to make sure it doesn't get any reviews, since the version is not final 😄 And thank you for doing such a thorough job in trying to come up with the best solution for this rather uncommon situation. |
|
Hi @hculea, sorry about the rather long silence on this -- been a busy-ish month for me. I had a detailed look at what we could do in this case, and here's my understanding: it is possible to introduce a new survey prompt on the newPlugin() setup flow, where the alternative CLI aliases/symlinks (in this case, In order to also introduce Please advise if my understanding is correct here, and if there are other ways to achieve the overall goal of supporting both |
|
For now, I have rebased with the main branch. |
|
Hey Arun, terribly sorry for the late response, looks like I've missed your reply! In order to request changes needing to be made in As for possible workarounds for this, the plugin ecosystem, in its inception, offers support for multi-executable plugins. The limitations around this is imposed by 1Password CLI, which handles only one exec for plugin. Would adding support for this feature also help in this case, in order to circumvent adding an additional prompt? |
That is interesting, thanks for sharing that @hculea! I have started a conversation here: Until we have a way to move forward, I'll mark this PR as a draft. |
|
Keep an eye on #232, I think the merging of this will get you unblocked 😄 |
|
@arunsathiya looks like this may be good to go too! Let's add both flyctl and fly as executables. |
|
@hculea If @arunsathiya allows the maintainers to edit, I think you all can move this PR forward 🙂 |
|
Sorry folks, been away. It's great that multiple executables can be defined within a single plugin! I have defined both I have tested with Other commands work well too: @hculea I think this PR is good to go now, but let me know if you have any questions/comments. |
AndyTitu
left a comment
There was a problem hiding this comment.
lgtm! happy that multi executable support was able to unblock this!
SimonBarendse
left a comment
There was a problem hiding this comment.
Thanks for the contribution @arunsathiya! Happy we found a solution here 😄
SimonBarendse
left a comment
There was a problem hiding this comment.
Thanks for the contribution @arunsathiya! Happy we found a solution here 😄
Description
Add support for flyctl. Fixes #93.
Roadblocks with naming
Flyctlis the actual product name, while they offer bothflyandflyctlas valid commands. From this comment, it seems thatflywill remain the primary command while also retainingflyctlas an alias.For this reason, I named this shell plugin
flyctlwhile specifyingflyas the executable command. Is this fine?Other questions
It doesn't seem that running
op plugin init flyautomatically sets upalias fly="op plugin run -- fly"on~/.config/op/plugins.shlike it happens forghoraws. I had to manually add that alias and runsource ~/.config/op/plugins.sh. Is this normal?I had to also add
alias flyctl="op plugin run -- fly"so that the shell plugin can take over when the user runsflyctlcommands.