Skip to content

Commit 01c6f85

Browse files
committed
Support both flyctl and fly as executables in the same flyctl shell plugin
1 parent 37dde10 commit 01c6f85

2 files changed

Lines changed: 23 additions & 0 deletions

File tree

plugins/flyctl/fly.go

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
package flyctl
2+
3+
import (
4+
"github.com/1Password/shell-plugins/sdk"
5+
"github.com/1Password/shell-plugins/sdk/needsauth"
6+
"github.com/1Password/shell-plugins/sdk/schema"
7+
"github.com/1Password/shell-plugins/sdk/schema/credname"
8+
)
9+
10+
func FlyCLI() schema.Executable {
11+
return schema.Executable{
12+
Name: "Fly",
13+
Runs: []string{"fly"},
14+
DocsURL: sdk.URL("https://fly.io/docs/flyctl/"),
15+
NeedsAuth: needsauth.NotForHelpOrVersion(),
16+
Uses: []schema.CredentialUsage{
17+
{
18+
Name: credname.AccessToken,
19+
},
20+
},
21+
}
22+
}

plugins/flyctl/plugin.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ func New() schema.Plugin {
1717
},
1818
Executables: []schema.Executable{
1919
FlyctlCLI(),
20+
FlyCLI(),
2021
},
2122
}
2223
}

0 commit comments

Comments
 (0)