More work on merging completions with parse tree

This commit is contained in:
Kovid Goyal
2022-09-26 07:34:49 +05:30
parent bf74413c1f
commit 97716fea8b
16 changed files with 263 additions and 426 deletions

View File

@@ -18,9 +18,9 @@ func fish_output_serializer(completions []*Completions, shell_state map[string]s
n := completions[0].Delegate.NumToRemove
fm := markup.New(false) // fish freaks out if there are escape codes in the description strings
if n > 0 {
words := make([]string, len(completions[0].all_words)-n+1)
words := make([]string, len(completions[0].AllWords)-n+1)
words[0] = completions[0].Delegate.Command
copy(words[1:], completions[0].all_words[n:])
copy(words[1:], completions[0].AllWords[n:])
for i, w := range words {
words[i] = fmt.Sprintf("(string escape -- %s)", utils.QuoteStringForFish(w))
}