carapace-bin/pkg/actions/env/common_unix.go
2023-09-23 14:12:00 +02:00

29 lines
846 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package env
import (
"github.com/rsteube/carapace"
"github.com/rsteube/carapace-bin/pkg/actions/os"
)
func init() {
knownVariables["common_unix"] = variables{
Variables: map[string]string{
"USER": "The current logged in user",
"HOME": "The home directory of the current user",
"EDITOR": "The default file editor to be used",
"SHELL": "The path of the current users shell, such as bash or zsh",
"LOGNAME": "The name of the current user",
"LANG": "The current locales settings",
"TERM": "The current terminal emulation",
"MAIL": "Location of where the current users mail is stored",
},
VariableCompletion: map[string]carapace.Action{
"HOME": carapace.ActionDirectories(),
"LANG": os.ActionLanguages(),
"LOGNAME": os.ActionUsers(),
"USER": os.ActionUsers(),
},
}
}