mirror of
https://github.com/rsteube/carapace-bin.git
synced 2025-05-05 15:32:53 +00:00
commit
3ce9b6f114
11
pkg/actions/env/common.go
vendored
11
pkg/actions/env/common.go
vendored
@ -4,18 +4,25 @@ import (
|
||||
_os "os"
|
||||
|
||||
"github.com/rsteube/carapace"
|
||||
"github.com/rsteube/carapace-bridge/pkg/actions/bridge"
|
||||
)
|
||||
|
||||
func init() {
|
||||
knownVariables["common"] = variables{
|
||||
Names: map[string]string{
|
||||
"BROWSER": "the browser to use",
|
||||
"EDITOR": "the editor to use",
|
||||
"HTTP_PROXY": "http proxy server",
|
||||
"HTTP_TIMEOUT": "The HTTP timeout in seconds",
|
||||
"HTTPS_PROXY": "https proxy server",
|
||||
"HTTP_TIMEOUT": "The HTTP timeout in seconds",
|
||||
"PAGER": "the pager to use",
|
||||
"PATH": "A list of directories to be searched when executing commands",
|
||||
},
|
||||
Completion: map[string]carapace.Action{
|
||||
"PATH": carapace.ActionDirectories().List(string(_os.PathListSeparator)).NoSpace(),
|
||||
"BROWSER": bridge.ActionCarapaceBin().Split(),
|
||||
"EDITOR": bridge.ActionCarapaceBin().Split(),
|
||||
"PAGER": bridge.ActionCarapaceBin().Split(),
|
||||
"PATH": carapace.ActionDirectories().List(string(_os.PathListSeparator)).NoSpace(),
|
||||
},
|
||||
}
|
||||
|
||||
|
38
pkg/actions/env/starship.go
vendored
Normal file
38
pkg/actions/env/starship.go
vendored
Normal file
@ -0,0 +1,38 @@
|
||||
package env
|
||||
|
||||
import (
|
||||
"github.com/rsteube/carapace"
|
||||
"github.com/rsteube/carapace/pkg/style"
|
||||
)
|
||||
|
||||
func init() {
|
||||
knownVariables["starship"] = variables{
|
||||
Names: map[string]string{
|
||||
"STARSHIP_CACHE": "cache location",
|
||||
"STARSHIP_CONFIG": "config location",
|
||||
"STARSHIP_LOG": "log level",
|
||||
"STARSHIP_NUM_THREADS": "number of threads",
|
||||
"STARSHIP_SESSION_KEY": "session key",
|
||||
"STARSHIP_SHELL": "shell",
|
||||
},
|
||||
Completion: map[string]carapace.Action{
|
||||
"STARSHIP_CACHE": carapace.ActionDirectories(),
|
||||
"STARSHIP_CONFIG": carapace.ActionFiles(),
|
||||
"STARSHIP_LOG": carapace.ActionValues("debug", "error", "info", "trace", "warn").StyleF(style.ForLogLevel),
|
||||
"STARSHIP_SHELL": carapace.ActionValues(
|
||||
"bash",
|
||||
"cmd",
|
||||
"elvish",
|
||||
"fish",
|
||||
"ion",
|
||||
"nu",
|
||||
"powershell",
|
||||
"pwsh",
|
||||
"tcsh",
|
||||
"xonsh",
|
||||
"zsh",
|
||||
),
|
||||
},
|
||||
}
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user