parent
f071a3ae70
commit
80ab2e4fc4
9
app.go
9
app.go
@ -137,7 +137,14 @@ func (app *app) loop() {
|
|||||||
|
|
||||||
if gSelect != "" {
|
if gSelect != "" {
|
||||||
go func() {
|
go func() {
|
||||||
app.ui.exprChan <- &callExpr{"select", []string{gSelect}, 1}
|
stat, err := os.Stat(gSelect)
|
||||||
|
if err != nil {
|
||||||
|
app.ui.exprChan <- &callExpr{"echoerr", []string{err.Error()}, 1}
|
||||||
|
} else if stat.IsDir() {
|
||||||
|
app.ui.exprChan <- &callExpr{"cd", []string{gSelect}, 1}
|
||||||
|
} else {
|
||||||
|
app.ui.exprChan <- &callExpr{"select", []string{gSelect}, 1}
|
||||||
|
}
|
||||||
}()
|
}()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user