Compare commits

..

No commits in common. "4e8aa7ed1d948d3145bf645dafba9736e379759c" and "c4438579f609ca6ac5b18705d6ec38384974f975" have entirely different histories.

6 changed files with 7 additions and 13 deletions

1
api.go
View File

@ -325,7 +325,6 @@ func hlprompt(t *rt.Thread, c *rt.GoCont) (rt.Cont, error) {
return nil, err
}
typ := "left"
// optional 2nd arg
if len(c.Etc()) != 0 {
ltyp := c.Etc()[0]
var ok bool

12
exec.go
View File

@ -42,13 +42,13 @@ func runInput(input string, priv bool) {
cmdFinish(0, input, priv)
return
}
input, exitCode, err = handleSh(input)
input, exitCode, err = handleSh(cmdString)
if err != nil {
fmt.Fprintln(os.Stderr, err)
}
cmdFinish(exitCode, input, priv)
case "hybridRev":
_, _, err = handleSh(input)
_, _, err = handleSh(cmdString)
if err == nil {
cmdFinish(0, input, priv)
return
@ -65,7 +65,7 @@ func runInput(input string, priv bool) {
}
cmdFinish(exitCode, input, priv)
case "sh":
input, exitCode, err = handleSh(input)
input, exitCode, err = handleSh(cmdString)
if err != nil {
fmt.Fprintln(os.Stderr, err)
}
@ -220,11 +220,7 @@ func execHandle(bg bool) interp.ExecHandlerFunc {
// If alias was found, use command alias
argstring = aliases.Resolve(argstring)
var err error
args, err = shell.Fields(argstring, nil)
if err != nil {
return err
}
args, _ = shell.Fields(argstring, nil)
}
// If command is defined in Lua then run it

View File

@ -85,7 +85,6 @@ const (
seqBold = "\x1b[1m"
seqUnderscore = "\x1b[4m"
seqBlink = "\x1b[5m"
seqInvert = "\x1b[7m"
)
// Text colours

View File

@ -121,7 +121,7 @@ func (g *CompletionGroup) writeGrid(rl *Instance) (comp string) {
}
if (x == g.tcPosX && y == g.tcPosY) && (g.isCurrent) {
comp += seqInvert
comp += seqCtermFg255 + seqFgBlackBright
}
comp += fmt.Sprintf("%-"+cellWidth+"s %s", g.Suggestions[i], seqReset)

View File

@ -188,7 +188,7 @@ func (g *CompletionGroup) writeList(rl *Instance) (comp string) {
// function highlights the cell depending on current selector place.
highlight := func(y int, x int) string {
if y == g.tcPosY && x == g.tcPosX && g.isCurrent {
return seqInvert
return seqCtermFg255 + seqFgBlackBright
}
return ""
}

View File

@ -101,7 +101,7 @@ func (g *CompletionGroup) writeMap(rl *Instance) (comp string) {
// Highlighting function
highlight := func(y int) string {
if y == g.tcPosY && g.isCurrent {
return seqInvert
return seqCtermFg255 + seqFgBlackBright
}
return ""
}