-
-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2544 from aftix/jj_v0.22.0
Jj v0.22.0
- Loading branch information
Showing
40 changed files
with
394 additions
and
335 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/carapace-sh/carapace" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var bookmarkCmd = &cobra.Command{ | ||
Use: "bookmark", | ||
Short: "Manage bookmarks", | ||
Aliases: []string{"branch"}, | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(bookmarkCmd).Standalone() | ||
|
||
bookmarkCmd.Flags().BoolP("help", "h", false, "Print help (see more with '--help')") | ||
rootCmd.AddCommand(bookmarkCmd) | ||
} |
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,30 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/carapace-sh/carapace" | ||
"github.com/carapace-sh/carapace-bin/pkg/actions/tools/jj" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var bookmark_createCmd = &cobra.Command{ | ||
Use: "create [OPTIONS] <NAMES>...", | ||
Short: "Create a new bookmark", | ||
Aliases: []string{"c"}, | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(bookmark_createCmd).Standalone() | ||
|
||
bookmark_createCmd.Flags().BoolP("help", "h", false, "Print help (see more with '--help')") | ||
bookmark_createCmd.Flags().StringP("revision", "r", "", "The bookmark's target revision") | ||
bookmarkCmd.AddCommand(bookmark_createCmd) | ||
|
||
carapace.Gen(bookmark_createCmd).FlagCompletion(carapace.ActionMap{ | ||
"revision": jj.ActionRevs(jj.RevOption{}.Default()), | ||
}) | ||
|
||
carapace.Gen(bookmark_createCmd).PositionalAnyCompletion( | ||
jj.ActionLocalBookmarks().FilterArgs(), | ||
) | ||
} |
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,25 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/carapace-sh/carapace" | ||
"github.com/carapace-sh/carapace-bin/pkg/actions/tools/jj" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var bookmark_deleteCmd = &cobra.Command{ | ||
Use: "delete [OPTIONS] [NAMES]...", | ||
Short: "Delete an existing bookmark and propagate the deletion to remotes on the next push", | ||
Aliases: []string{"d"}, | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(bookmark_deleteCmd).Standalone() | ||
|
||
bookmark_deleteCmd.Flags().BoolP("help", "h", false, "Print help (see more with '--help')") | ||
bookmarkCmd.AddCommand(bookmark_deleteCmd) | ||
|
||
carapace.Gen(bookmark_deleteCmd).PositionalAnyCompletion( | ||
jj.ActionLocalBookmarks().FilterArgs(), | ||
) | ||
} |
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,25 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/carapace-sh/carapace" | ||
"github.com/carapace-sh/carapace-bin/pkg/actions/tools/jj" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var bookmark_forgetCmd = &cobra.Command{ | ||
Use: "forget [OPTIONS] [NAMES]...", | ||
Short: "Forget everything about a bookmark, including its local and remote targets", | ||
Aliases: []string{"f"}, | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(bookmark_forgetCmd).Standalone() | ||
|
||
bookmark_forgetCmd.Flags().BoolP("help", "h", false, "Print help (see more with '--help')") | ||
bookmarkCmd.AddCommand(bookmark_forgetCmd) | ||
|
||
carapace.Gen(bookmark_forgetCmd).PositionalAnyCompletion( | ||
jj.ActionLocalBookmarks().FilterArgs(), | ||
) | ||
} |
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,36 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/carapace-sh/carapace" | ||
"github.com/carapace-sh/carapace-bin/pkg/actions/tools/jj" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var bookmark_listCmd = &cobra.Command{ | ||
Use: "list [OPTIONS] [NAMES]...", | ||
Short: "List bookmarks and their targets", | ||
Aliases: []string{"l"}, | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(bookmark_listCmd).Standalone() | ||
|
||
bookmark_listCmd.Flags().BoolP("all-remotes", "a", false, "Show all tracking and non-tracking remote bookmarks including the ones whose targets are synchronized with the local bookmarks") | ||
bookmark_listCmd.Flags().BoolP("conflicted", "c", false, "Show only conflicted bookmarks") | ||
bookmark_listCmd.Flags().BoolP("help", "h", false, "Print help (see more with '--help')") | ||
bookmark_listCmd.Flags().StringSliceP("revisions", "r", []string{}, "Show bookmarks whose local targets are in the given revisions") | ||
bookmark_listCmd.Flags().StringP("template", "T", "", "Render each bookmark using the given template") | ||
|
||
bookmark_listCmd.MarkFlagsMutuallyExclusive("all-remotes", "conflicted") | ||
|
||
bookmarkCmd.AddCommand(bookmark_listCmd) | ||
|
||
carapace.Gen(bookmark_listCmd).FlagCompletion(carapace.ActionMap{ | ||
"revisions": jj.ActionRevSets(jj.RevOption{}.Default()).UniqueList(","), | ||
}) | ||
|
||
carapace.Gen(bookmark_listCmd).PositionalAnyCompletion( | ||
jj.ActionLocalBookmarks().FilterArgs(), | ||
) | ||
} |
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,33 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/carapace-sh/carapace" | ||
"github.com/carapace-sh/carapace-bin/pkg/actions/tools/jj" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var bookmark_moveCmd = &cobra.Command{ | ||
Use: "move [OPTIONS] <--from <REVISIONS>|NAME>", | ||
Short: "Move existing bookmarks to target revision", | ||
Aliases: []string{"s"}, | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(bookmark_moveCmd).Standalone() | ||
|
||
bookmark_moveCmd.Flags().BoolP("allow-backwards", "B", false, "Allow moving the bookmark backwards or sideways") | ||
bookmark_moveCmd.Flags().String("from", "@", "Move part of this change into the destination") | ||
bookmark_moveCmd.Flags().BoolP("help", "h", false, "Print help (see more with '--help')") | ||
bookmark_moveCmd.Flags().String("to", "@", "Move part of the source into this change") | ||
bookmarkCmd.AddCommand(bookmark_moveCmd) | ||
|
||
carapace.Gen(bookmark_moveCmd).FlagCompletion(carapace.ActionMap{ | ||
"from": jj.ActionRevs(jj.RevOption{}.Default()), | ||
"to": jj.ActionRevs(jj.RevOption{}.Default()), | ||
}) | ||
|
||
carapace.Gen(bookmark_moveCmd).PositionalAnyCompletion( | ||
jj.ActionLocalBookmarks().FilterArgs(), | ||
) | ||
} |
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/carapace-sh/carapace" | ||
"github.com/carapace-sh/carapace-bin/pkg/actions/tools/jj" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var bookmark_setCmd = &cobra.Command{ | ||
Use: "set [OPTIONS] <NAMES>...", | ||
Short: "Update a given bookmark to point to a certain commit", | ||
Aliases: []string{"s"}, | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(bookmark_setCmd).Standalone() | ||
|
||
bookmark_setCmd.Flags().BoolP("allow-backwards", "B", false, "Allow moving the bookmark backwards or sideways") | ||
bookmark_setCmd.Flags().BoolP("help", "h", false, "Print help (see more with '--help')") | ||
bookmark_setCmd.Flags().StringP("revision", "r", "", "The bookmark's target revision") | ||
bookmarkCmd.AddCommand(bookmark_setCmd) | ||
|
||
carapace.Gen(bookmark_setCmd).FlagCompletion(carapace.ActionMap{ | ||
"revision": jj.ActionRevs(jj.RevOption{}.Default()), | ||
}) | ||
|
||
carapace.Gen(bookmark_setCmd).PositionalAnyCompletion( | ||
jj.ActionLocalBookmarks().FilterArgs(), | ||
) | ||
} |
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/carapace-sh/carapace" | ||
"github.com/carapace-sh/carapace-bin/pkg/actions/tools/jj" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var bookmark_trackCmd = &cobra.Command{ | ||
Use: "track [OPTIONS] <NAMES>...", | ||
Short: "Start tracking given remote bookmarks", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(bookmark_trackCmd).Standalone() | ||
|
||
bookmark_trackCmd.Flags().BoolP("help", "h", false, "Print help (see more with '--help')") | ||
bookmarkCmd.AddCommand(bookmark_trackCmd) | ||
|
||
carapace.Gen(bookmark_trackCmd).PositionalAnyCompletion( | ||
jj.ActionRemoteBookmarks("").FilterArgs(), | ||
) | ||
} |
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/carapace-sh/carapace" | ||
"github.com/carapace-sh/carapace-bin/pkg/actions/tools/jj" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var bookmark_untrackCmd = &cobra.Command{ | ||
Use: "untrack", | ||
Short: "Stop tracking given remote bookmarks", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(bookmark_untrackCmd).Standalone() | ||
|
||
bookmark_untrackCmd.Flags().BoolP("help", "h", false, "Print help (see more with '--help')") | ||
bookmarkCmd.AddCommand(bookmark_untrackCmd) | ||
|
||
carapace.Gen(bookmark_untrackCmd).PositionalAnyCompletion( | ||
jj.ActionRemoteBookmarks("").FilterArgs(), // TODO tracked bookmarks | ||
) | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.