-
-
Notifications
You must be signed in to change notification settings - Fork 47
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
9 changed files
with
177 additions
and
3 deletions.
There are no files selected for viewing
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
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
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/rsteube/carapace" | ||
"github.com/rsteube/carapace-bin/completers/git_completer/cmd/action" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var stash_branchCmd = &cobra.Command{ | ||
Use: "branch", | ||
Short: "create and check out a new branch with the stashes changes", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(stash_branchCmd).Standalone() | ||
|
||
stashCmd.AddCommand(stash_branchCmd) | ||
|
||
carapace.Gen(stash_branchCmd).PositionalCompletion( | ||
action.ActionRefs(action.RefOption{LocalBranches: true}), | ||
action.ActionStashes(), | ||
) | ||
} |
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/rsteube/carapace" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var stash_clearCmd = &cobra.Command{ | ||
Use: "clear", | ||
Short: "remove all the stash entries", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(stash_clearCmd).Standalone() | ||
|
||
stashCmd.AddCommand(stash_clearCmd) | ||
} |
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/rsteube/carapace" | ||
"github.com/rsteube/carapace-bin/completers/git_completer/cmd/action" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var stash_dropCmd = &cobra.Command{ | ||
Use: "drop", | ||
Short: "remove a single stash entry", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(stash_dropCmd).Standalone() | ||
stash_dropCmd.Flags().BoolP("quiet", "q", false, "suppress feedback messages") | ||
|
||
stashCmd.AddCommand(stash_dropCmd) | ||
|
||
carapace.Gen(stash_dropCmd).PositionalCompletion(action.ActionStashes()) | ||
} |
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/rsteube/carapace" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var stash_listCmd = &cobra.Command{ | ||
Use: "list", | ||
Short: "list the stash entries that you currently have", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(stash_listCmd).Standalone() | ||
|
||
stashCmd.AddCommand(stash_listCmd) | ||
} |
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/rsteube/carapace" | ||
"github.com/rsteube/carapace-bin/completers/git_completer/cmd/action" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var stash_popCmd = &cobra.Command{ | ||
Use: "pop", | ||
Aliases: []string{"apply"}, | ||
Short: "remove a single stashed state", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(stash_popCmd).Standalone() | ||
stash_popCmd.Flags().Bool("index", false, "try to reinstate index changes as well") | ||
stash_popCmd.Flags().BoolP("quiet", "q", false, "suppress feedback messages") | ||
|
||
stashCmd.AddCommand(stash_popCmd) | ||
|
||
carapace.Gen(stash_popCmd).PositionalCompletion(action.ActionStashes()) | ||
} |
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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/rsteube/carapace" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var stash_pushCmd = &cobra.Command{ | ||
Use: "push", | ||
Short: "save your local modifications to a new stash", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(stash_pushCmd).Standalone() | ||
|
||
stash_pushCmd.Flags().BoolP("all", "a", false, "also stash ignored and untracked") | ||
stash_pushCmd.Flags().BoolP("include-untracked", "u", false, "also stash untracked") | ||
stash_pushCmd.Flags().BoolP("keep-index", "k", false, "keep changed added to index") | ||
stash_pushCmd.Flags().StringP("message", "m", "", "set description") | ||
stash_pushCmd.Flags().Bool("no-keep-index", false, "also apply to index") | ||
stash_pushCmd.Flags().BoolP("patch", "p", false, "interactively select hunks between HEAD and working tree") | ||
stash_pushCmd.Flags().Bool("pathspec-file-nul", false, "pathspec elemts are seperated by NUL") | ||
stash_pushCmd.Flags().String("pathspec-from-file", "", "read pathspec from file") | ||
stash_pushCmd.Flags().BoolP("quiet", "q", false, "suppress feedback messages") | ||
stashCmd.AddCommand(stash_pushCmd) | ||
|
||
carapace.Gen(stash_pushCmd).FlagCompletion(carapace.ActionMap{ | ||
"pathspec-from-file": carapace.ActionFiles(""), | ||
}) | ||
} |
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/rsteube/carapace" | ||
"github.com/rsteube/carapace-bin/completers/git_completer/cmd/action" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var stash_showCmd = &cobra.Command{ | ||
Use: "show", | ||
Short: "show the changes recorded in the stash entry", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(stash_showCmd).Standalone() | ||
|
||
stashCmd.AddCommand(stash_showCmd) | ||
|
||
carapace.Gen(stash_showCmd).PositionalCompletion(action.ActionStashes()) | ||
} |