forked from x/icebergs
add some
This commit is contained in:
parent
aff83532dd
commit
3a2fd6d3bb
3
init.go
3
init.go
@ -118,6 +118,7 @@ func Run(arg ...string) string {
|
|||||||
conf.Wait()
|
conf.Wait()
|
||||||
os.Exit(kit.Int(Pulse.Option(EXIT)))
|
os.Exit(kit.Int(Pulse.Option(EXIT)))
|
||||||
default:
|
default:
|
||||||
|
_forever = true
|
||||||
Pulse.Cmdy(INIT).Cmdy(arg)
|
Pulse.Cmdy(INIT).Cmdy(arg)
|
||||||
kit.If(strings.TrimSpace(Pulse.Result()) == "" && Pulse.Length() > 0, func() { Pulse.TableEcho() })
|
kit.If(strings.TrimSpace(Pulse.Result()) == "" && Pulse.Length() > 0, func() { Pulse.TableEcho() })
|
||||||
kit.If(Pulse.Result() != "" && !strings.HasSuffix(Pulse.Result(), NL), func() { Pulse.Echo(NL) })
|
kit.If(Pulse.Result() != "" && !strings.HasSuffix(Pulse.Result(), NL), func() { Pulse.Echo(NL) })
|
||||||
@ -131,6 +132,7 @@ func HasVar() bool {
|
|||||||
if !_forever {
|
if !_forever {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
return true
|
||||||
if _, e := os.Stat(VAR); e == nil {
|
if _, e := os.Stat(VAR); e == nil {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
@ -140,6 +142,7 @@ func HasUsr() bool {
|
|||||||
if !_forever {
|
if !_forever {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
return true
|
||||||
if _, e := os.Stat(USR); e == nil {
|
if _, e := os.Stat(USR); e == nil {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user