- Extensions on Windows now enabled through the `sh.exe` interpreter - `sh.exe` now found on Windows when git was installed via scoop - `gh extensions list` command shows origin repo for the extension - `gh extensions upgrade --all` is required to upgrade all extensions - Added `gh extensions remove` - Shell completions now include aliases and extension names - `gh` help output now lists available extension names - Extensions are stored to XDG_DATA_HOME
22 lines
527 B
Go
22 lines
527 B
Go
package extensions
|
|
|
|
import (
|
|
"io"
|
|
)
|
|
|
|
//go:generate moq -out extension_mock.go . Extension
|
|
type Extension interface {
|
|
Name() string
|
|
Path() string
|
|
URL() string
|
|
}
|
|
|
|
//go:generate moq -out manager_mock.go . ExtensionManager
|
|
type ExtensionManager interface {
|
|
List() []Extension
|
|
Install(url string, stdout, stderr io.Writer) error
|
|
InstallLocal(dir string) error
|
|
Upgrade(name string, stdout, stderr io.Writer) error
|
|
Remove(name string) error
|
|
Dispatch(args []string, stdin io.Reader, stdout, stderr io.Writer) (bool, error)
|
|
}
|