-
-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
11 additions
and
7 deletions.
There are no files selected for viewing
18 changes: 11 additions & 7 deletions
18
...ters/git_completer/cmd/clean_generated.go → completers/git_completer/cmd/clean.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,28 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/rsteube/carapace" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var cleanCmd = &cobra.Command{ | ||
Use: "clean", | ||
Short: "Remove untracked files from the working tree", | ||
Run: func(cmd *cobra.Command, args []string) { | ||
}, | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
cleanCmd.Flags().BoolP("d", "d", false, "remove whole directories") | ||
cleanCmd.Flags().BoolP("exclude", "e", false, "<pattern> add <pattern> to ignore rules") | ||
carapace.Gen(cleanCmd).Standalone() | ||
|
||
cleanCmd.Flags().BoolS("x", "x", false, "remove ignored files, too") | ||
cleanCmd.Flags().BoolS("X", "X", false, "remove only ignored files") | ||
cleanCmd.Flags().BoolS("d", "d", false, "remove whole directories") | ||
cleanCmd.Flags().BoolP("dry-run", "n", false, "dry run") | ||
cleanCmd.Flags().StringP("exclude", "e", "", "add <pattern> to ignore rules") | ||
cleanCmd.Flags().BoolP("force", "f", false, "force") | ||
cleanCmd.Flags().BoolP("interactive", "i", false, "interactive cleaning") | ||
cleanCmd.Flags().BoolP("dry-run", "n", false, "dry run") | ||
cleanCmd.Flags().BoolP("quiet", "q", false, "do not print names of files removed") | ||
cleanCmd.Flags().BoolP("x", "x", false, "remove ignored files, too") | ||
cleanCmd.Flags().BoolP("X", "X", false, "remove only ignored files") | ||
rootCmd.AddCommand(cleanCmd) | ||
|
||
carapace.Gen(cleanCmd).PositionalAnyCompletion(carapace.ActionFiles("")) | ||
} |