(Chore): Use of the new autocompleter here for paths/
This commit is contained in:
@@ -20,7 +20,7 @@ func RunExtractFlow() error {
|
|||||||
huh.NewGroup(
|
huh.NewGroup(
|
||||||
huh.NewInput().
|
huh.NewInput().
|
||||||
Title("📦 Archive Path").
|
Title("📦 Archive Path").
|
||||||
Description("Path to the archive file").
|
Description("Path to the archive file - Tab for completions").
|
||||||
Placeholder("/path/to/archive.zip").
|
Placeholder("/path/to/archive.zip").
|
||||||
Value(&archivePath).
|
Value(&archivePath).
|
||||||
Validate(func(s string) error {
|
Validate(func(s string) error {
|
||||||
@@ -31,11 +31,12 @@ func RunExtractFlow() error {
|
|||||||
return fmt.Errorf("archive does not exist")
|
return fmt.Errorf("archive does not exist")
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}),
|
}).
|
||||||
|
Suggestions(getArchiveCompletions("")),
|
||||||
|
|
||||||
huh.NewInput().
|
huh.NewInput().
|
||||||
Title("📂 Destination Path").
|
Title("📂 Destination Path").
|
||||||
Description("Where to extract files").
|
Description("Where to extract files - Tab for completions").
|
||||||
Placeholder("/path/to/destination").
|
Placeholder("/path/to/destination").
|
||||||
Value(&destPath).
|
Value(&destPath).
|
||||||
Validate(func(s string) error {
|
Validate(func(s string) error {
|
||||||
@@ -43,7 +44,8 @@ func RunExtractFlow() error {
|
|||||||
return fmt.Errorf("destination path cannot be empty")
|
return fmt.Errorf("destination path cannot be empty")
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}),
|
}).
|
||||||
|
Suggestions(getDirCompletions("")),
|
||||||
),
|
),
|
||||||
|
|
||||||
huh.NewGroup(
|
huh.NewGroup(
|
||||||
|
|||||||
Reference in New Issue
Block a user