-
-
Notifications
You must be signed in to change notification settings - Fork 53
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
6 changed files
with
95 additions
and
19 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
5 changes: 3 additions & 2 deletions
5
...leters/git_completer/cmd/gui_generated.go → completers/git_completer/cmd/gui.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,17 +1,18 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/rsteube/carapace" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var guiCmd = &cobra.Command{ | ||
Use: "gui", | ||
Short: "A portable graphical interface to Git", | ||
Run: func(cmd *cobra.Command, args []string) { | ||
}, | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(guiCmd).Standalone() | ||
|
||
rootCmd.AddCommand(guiCmd) | ||
} |
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/rsteube/carapace-bin/pkg/actions/tools/git" | ||
"github.com/rsteube/carapace-bin/pkg/util" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var gui_blameCmd = &cobra.Command{ | ||
Use: "blame", | ||
Short: "Start a blame viewer on the specified file on the given version", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(gui_blameCmd).Standalone() | ||
gui_blameCmd.Flags().String("line", "", "Loads annotations as described above and automatically scrolls the view") | ||
|
||
guiCmd.AddCommand(gui_blameCmd) | ||
|
||
carapace.Gen(gui_blameCmd).PositionalCompletion( | ||
carapace.ActionCallback(func(c carapace.Context) carapace.Action { | ||
if util.HasPathPrefix(c.CallbackValue) { | ||
return carapace.ActionFiles() | ||
} | ||
return git.ActionRefs(git.RefOptionDefault) | ||
}), | ||
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,23 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/rsteube/carapace" | ||
"github.com/rsteube/carapace-bin/pkg/actions/tools/git" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var browserCmd = &cobra.Command{ | ||
Use: "browser", | ||
Short: "Start a tree browser showing all files in the specified commit", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(browserCmd).Standalone() | ||
|
||
guiCmd.AddCommand(browserCmd) | ||
|
||
carapace.Gen(browserCmd).PositionalCompletion( | ||
git.ActionRefs(git.RefOptionDefault), | ||
) | ||
} |
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,20 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/rsteube/carapace" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var gui_citoolCmd = &cobra.Command{ | ||
Use: "citool", | ||
Short: "Start git gui and arrange to make exactly one commit before exiting and returning to the shell", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(gui_citoolCmd).Standalone() | ||
gui_citoolCmd.Flags().Bool("amend", false, "Automatically enter the Amend Last Commit mode of the interface") | ||
gui_citoolCmd.Flags().Bool("nocommit", false, "Behave as normal citool, but instead of making a commit simply terminate with a zero exit code") | ||
|
||
guiCmd.AddCommand(gui_citoolCmd) | ||
} |
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 gui_versionCmd = &cobra.Command{ | ||
Use: "version", | ||
Short: "Display the currently running version of git gui", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(gui_versionCmd).Standalone() | ||
|
||
guiCmd.AddCommand(gui_versionCmd) | ||
} |