Open salaboy opened 1 year ago
We have talked in the past about entering "confirm" mode when a user types simply func create
with no flags/parameters. See https://github.com/knative-sandbox/kn-plugin-func/issues/573#issuecomment-1017995470
Personally, I like this a lot.
I'll take over the task: enter "confirm" mode after func create
; as proposed above.
/assign @grafvonb
@lance @salaboy Could you clearly state what is the scope to implement for this issue? I think I have mixed it with #573...
@grafvonb we talked a little about this in the working group meeting. It's not very clearly laid out, and could benefit from coordination between this issue and a few others - or it could be closed as a duplicate. @salaboy do you want to chime in here?
Looking closer at old comments and such, I think this is almost certainly a duplicate of #573 but will let @salaboy and @lkingland chime in.
This issue is stale because it has been open for 90 days with no
activity. It will automatically close after 30 more days of
inactivity. Reopen the issue with /reopen
. Mark the issue as
fresh by adding the comment /remove-lifecycle stale
.
/remove-lifecycle stale
@lkingland after going through each comment, my question is what shall be the final design for this? I mean shall we put user in the confirm mode triggering func create -c
or shall we build fully interactive func create
command. Cause right now we are not doing any of them!
This issue is stale because it has been open for 90 days with no
activity. It will automatically close after 30 more days of
inactivity. Reopen the issue with /reopen
. Mark the issue as
fresh by adding the comment /remove-lifecycle stale
.
Currently
func create
takes a mandatory argument (language) in the shape of a flag. It also requires to be run inside an empty directory (unless you specify the path) which is not optimal or expected by all users.Mandatory arguments
Currently, the "language" flag is the only mandatory parameter so,
If you type
func create
on an empty directory you get:This doesn't help a newcomer to know what the
language
flag is, for some people this will mean--language
or-l
but it might not be clear for everyone. Notice that this is a required parameter hence making this a positional argument might make some sense. In such a case we can make something like this:Checking the
func create --help
, it shows an example that is not working:Directory creation
Creating or not creating a directory for the function is a controversial topic that, in my opinion, we need to fix. If we follow the
git
,npm
or evengo mod
approach you are always working in a directory where your project will live. For these cases, the user needs to create a directory. Currentfunc create
checks if the user is in an empty directory to create a function if the name of the function is not provided as the last argument, in which case it creates a directory.For example:
Created a directory and a function inside it.
For this one I have mixed feelings, as we should decide if we create or not create directories with
func
, supporting both in my opinion causes confusion.if we change [path] to be a flag, it will make more sense for cases where a CI tool is running create, so we don't loose the functionality.
Open Questions
Do you have any other categories of things to improve for
func create
? Any other thoughts or ideas? @lance @lkingland @zroubalik @matejvasek