Skip to content

Commit 3c90d7e

Browse files
committed
Handle listnames with spaces in them
1 parent 36a7fd9 commit 3c90d7e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Commands/Base/Completers/ListNameCompleter.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ public IEnumerable<CompletionResult> CompleteArgument(string commandName, string
1616
PnPConnection.Current.Context.ExecuteQueryRetry();
1717
foreach (var list in result.Where(l => l.Title.StartsWith(wordToComplete, StringComparison.InvariantCultureIgnoreCase)))
1818
{
19-
yield return new CompletionResult(list.Title);
19+
var listTitle = list.Title.IndexOf(" ") > 0 ? $"'{list.Title}'" : list.Title;
20+
yield return new CompletionResult(listTitle,list.Title,CompletionResultType.ParameterValue,list.Title);
2021
}
2122

2223
}

0 commit comments

Comments
 (0)