mirror of https://github.com/Hilbis/Hilbish
Compare commits
4 Commits
e044aeb5ed
...
ded0be275f
Author | SHA1 | Date |
---|---|---|
TorchedSammy | ded0be275f | |
TorchedSammy | e3fdf84f5c | |
TorchedSammy | 194e4e01b7 | |
TorchedSammy | e5c9b85008 |
2
main.go
2
main.go
|
@ -155,7 +155,7 @@ func main() {
|
||||||
if getopt.NArgs() > 0 {
|
if getopt.NArgs() > 0 {
|
||||||
luaArgs := rt.NewTable()
|
luaArgs := rt.NewTable()
|
||||||
for i, arg := range getopt.Args() {
|
for i, arg := range getopt.Args() {
|
||||||
luaArgs.Set(rt.IntValue(int64(i + 1)), rt.StringValue(arg))
|
luaArgs.Set(rt.IntValue(int64(i)), rt.StringValue(arg))
|
||||||
}
|
}
|
||||||
|
|
||||||
l.GlobalEnv().Set(rt.StringValue("args"), rt.TableValue(luaArgs))
|
l.GlobalEnv().Set(rt.StringValue("args"), rt.TableValue(luaArgs))
|
||||||
|
|
|
@ -34,7 +34,6 @@ const (
|
||||||
charCtrlHat // ^^
|
charCtrlHat // ^^
|
||||||
charCtrlUnderscore // ^_
|
charCtrlUnderscore // ^_
|
||||||
charBackspace2 = 127 // ASCII 1963
|
charBackspace2 = 127 // ASCII 1963
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// Escape sequences
|
// Escape sequences
|
||||||
|
|
|
@ -416,6 +416,10 @@ func (rl *Instance) Readline() (string, error) {
|
||||||
rl.renderHelpers()
|
rl.renderHelpers()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case charCtrlUnderscore:
|
||||||
|
rl.undoLast()
|
||||||
|
rl.viUndoSkipAppend = true
|
||||||
|
|
||||||
case '\r':
|
case '\r':
|
||||||
fallthrough
|
fallthrough
|
||||||
case '\n':
|
case '\n':
|
||||||
|
@ -553,8 +557,8 @@ func (rl *Instance) editorInput(r []rune) {
|
||||||
rl.refreshVimStatus()
|
rl.refreshVimStatus()
|
||||||
|
|
||||||
default:
|
default:
|
||||||
// For some reason Ctrl+k messes with the input line, so ignore it.
|
// Don't insert control keys
|
||||||
if r[0] == 11 {
|
if r[0] >= 1 && r[0] <= 31 {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// We reset the history nav counter each time we come here:
|
// We reset the history nav counter each time we come here:
|
||||||
|
|
2
vars.go
2
vars.go
|
@ -2,7 +2,7 @@ package main
|
||||||
|
|
||||||
// String vars that are free to be changed at compile time
|
// String vars that are free to be changed at compile time
|
||||||
var (
|
var (
|
||||||
version = "v1.2.0"
|
version = "v2.0.0"
|
||||||
defaultConfDir = "" // ~ will be substituted for home, path for user's default config
|
defaultConfDir = "" // ~ will be substituted for home, path for user's default config
|
||||||
defaultHistDir = ""
|
defaultHistDir = ""
|
||||||
commonRequirePaths = "';./libs/?/init.lua;./?/init.lua;./?/?.lua'"
|
commonRequirePaths = "';./libs/?/init.lua;./?/init.lua;./?/?.lua'"
|
||||||
|
|
Loading…
Reference in New Issue