Skip to content

Commit

Permalink
Ask more questions during fury init
Browse files Browse the repository at this point in the history
  • Loading branch information
propensive committed Mar 24, 2024
1 parent a761e18 commit b07f6f3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion res/build.id
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1110
1135
13 changes: 8 additions & 5 deletions src/cli/actions.scala
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,15 @@ object actions:
def initialize(directory: Path)(using CliFrontEnd): ExitStatus raises UserError =
given (UserError fixes DismissError) = accede
if (directory / p".fury").exists() then abort(UserError(msg"A build already exists in this directory"))
val nameSuggestion = directory.name
interactive:
Out.print(e"$Italic(Please enter the project name:) ")
LineEditor(t"hello-world", 0).ask: choice =>
Out.println(e"You chose $Bold($choice)")
//val (name, events2) = LineEditor(t"hello-world").ask(events)
//info(e"Project has the name $name")
Out.print(e" $Italic(Project ID:) ")
LineEditor(nameSuggestion).ask: id =>
Out.print(e" $Italic(Project name:) ")
LineEditor(id.capitalize).ask: name =>
Out.print(e"$Italic(Project description:) ")
LineEditor(t"").ask: description =>
Out.println(e"You chose $Bold($id), $Bold($name), and $Bold($description)")

ExitStatus.Ok

Expand Down

0 comments on commit b07f6f3

Please sign in to comment.