- 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
23 lines
314 B
Go
23 lines
314 B
Go
package extensions
|
|
|
|
import (
|
|
"path/filepath"
|
|
"strings"
|
|
)
|
|
|
|
type Extension struct {
|
|
path string
|
|
url string
|
|
}
|
|
|
|
func (e *Extension) Name() string {
|
|
return strings.TrimPrefix(filepath.Base(e.path), "gh-")
|
|
}
|
|
|
|
func (e *Extension) Path() string {
|
|
return e.path
|
|
}
|
|
|
|
func (e *Extension) URL() string {
|
|
return e.url
|
|
}
|