improvements for tab complete
This commit is contained in:
parent
dbd288a0ff
commit
44521f306f
1 changed files with 10 additions and 1 deletions
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue