improvements for tab complete

This commit is contained in:
Aidan 2020-07-20 09:16:05 -07:00
parent dbd288a0ff
commit 44521f306f
No known key found for this signature in database
GPG key ID: 327711E983899316

View file

@ -59,7 +59,16 @@ func ShellCompleter(line string, vt ast.VarTable, ft ast.FuncTable) []string {
}
} else {
for _, f := range fobjs {
compSource = append(compSource, dir + "/" + f.Name())
fileTok := f.Name()
if dir != "." {
fileTok = dir + "/" + fileTok
}
if f.IsDir() {
fileTok = fileTok + "/"
}
compSource = append(compSource, fileTok)
}
}