Open marckruzik opened 9 months ago
The current logic is that if there's no other option in the magic command to indicate a field name (e.g. the --name
option for the #!set
command), and the prompt is usable as a field name (e.g. has no spaces), then the field name is inferred from the prompt.
I'm fixing some of the quote behavior inconsistencies as part of the PR for #3323.
Describe the bug
This example from the doc is working:
Which gives a prompt
Please enter a URL
.But if there is no space in the input, the prompt changes.
Which gives a prompt
Please enter a value for field "Please-enter-a-URL".
. But it should give the promptPlease-enter-a-URL
.Same goes with a one word input such as "Age".
I think the intended behavior of
@input
is to specify the prompt, rather than having a wording about a field. So in all cases, the prompt should be the content specified in@input
.Notes
Maybe there is a confusion with
@input:input-please
(notice the absence of double quotes), as seen inVariableSharingTests.SetMagicCommand.cs
:This is an undocumented use of
@input
. The behavior seems to be the same with@input:input-please
(without double quotes) and@input:"input-please"
(with double quotes): it asks for a field instead of using the text in place of the prompt.Please complete the following:
Which version of .NET Interactive are you using? (In a notebook, run the
#!about
magic command. ):Version: 1.0.456201+e5dc02dbdc933d895d722e69bfa98d580dcda8d9