2020-11-25 13:01:53 +02:00
|
|
|
package base
|
|
|
|
|
|
|
|
// CommandEnvHolder is a struct holds the environment info of commands
|
|
|
|
type CommandEnvHolder struct {
|
2024-07-12 01:20:06 +03:00
|
|
|
// Executable name of current binary
|
2020-11-25 13:01:53 +02:00
|
|
|
Exec string
|
2020-12-04 03:36:16 +02:00
|
|
|
// commands column width of current command
|
|
|
|
CommandsWidth int
|
2020-11-25 13:01:53 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
// CommandEnv holds the environment info of commands
|
|
|
|
var CommandEnv CommandEnvHolder
|
|
|
|
|
|
|
|
func init() {
|
2024-08-15 11:04:09 +03:00
|
|
|
/*
|
|
|
|
exec, err := os.Executable()
|
|
|
|
if err != nil {
|
|
|
|
return
|
|
|
|
}
|
|
|
|
CommandEnv.Exec = path.Base(exec)
|
|
|
|
*/
|
2020-11-25 13:01:53 +02:00
|
|
|
CommandEnv.Exec = "xray"
|
|
|
|
}
|