handle escaped spaces in tokens + filepaths in completions
This commit is contained in:
parent
61dd498d27
commit
546e1711e5
2 changed files with 11 additions and 1 deletions
|
|
@ -80,7 +80,8 @@ func ShellCompleter(line string, vt ast.VarTable, ft ast.FuncTable) []string {
|
|||
completions := []string{}
|
||||
for _, i := range compSource {
|
||||
if strings.HasPrefix(i, tail) {
|
||||
completions = append(completions, head + i)
|
||||
str := strings.ReplaceAll(i, " ", "\\ ")
|
||||
completions = append(completions, head + str)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue