Skip to content

Commit 7334e25

Browse files
committed
jj: udates from v0.37.0
1 parent df6c5d4 commit 7334e25

File tree

15 files changed

+74
-18
lines changed

15 files changed

+74
-18
lines changed

completers/common/jj_completer/cmd/bookmark_list.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ var bookmark_listCmd = &cobra.Command{
1616
func init() {
1717
carapace.Gen(bookmark_listCmd).Standalone()
1818

19-
bookmark_listCmd.Flags().Bool("all", false, "Show all tracking and non-tracking remote bookmarks including the ones whose targets are synchronized with the local bookmarks")
20-
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")
19+
bookmark_listCmd.Flags().Bool("all", false, "Show all tracked and untracked remote bookmarks including the ones whose targets are synchronized with the local bookmarks")
20+
bookmark_listCmd.Flags().BoolP("all-remotes", "a", false, "Show all tracked and untracked remote bookmarks including the ones whose targets are synchronized with the local bookmarks")
2121
bookmark_listCmd.Flags().BoolP("conflicted", "c", false, "Show conflicted bookmarks only")
2222
bookmark_listCmd.Flags().BoolP("help", "h", false, "Print help (see more with '--help')")
23-
bookmark_listCmd.Flags().StringSlice("remote", nil, "Show all tracking and non-tracking remote bookmarks belonging to this remote")
23+
bookmark_listCmd.Flags().StringSlice("remote", nil, "Show all tracked and untracked remote bookmarks belonging to this remote")
2424
bookmark_listCmd.Flags().StringSliceP("revisions", "r", nil, "Show bookmarks whose local targets are in the given revisions")
2525
bookmark_listCmd.Flags().StringSlice("sort", nil, "Sort bookmarks based on the given key (or multiple keys)")
2626
bookmark_listCmd.Flags().StringP("template", "T", "", "Render each bookmark using the given template")
27-
bookmark_listCmd.Flags().BoolP("tracked", "t", false, "Show remote tracked bookmarks only. Omits local Git-tracking bookmarks by default")
27+
bookmark_listCmd.Flags().BoolP("tracked", "t", false, "Show tracked remote bookmarks only")
2828
bookmark_listCmd.Flag("all").Hidden = true
2929
bookmarkCmd.AddCommand(bookmark_listCmd)
3030

completers/common/jj_completer/cmd/bookmark_track.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,13 @@ func init() {
1717
carapace.Gen(bookmark_trackCmd).Standalone()
1818

1919
bookmark_trackCmd.Flags().BoolP("help", "h", false, "Print help (see more with '--help')")
20+
bookmark_trackCmd.Flags().StringSlice("remote", nil, "Remote names to track")
2021
bookmarkCmd.AddCommand(bookmark_trackCmd)
2122

23+
carapace.Gen(bookmark_trackCmd).FlagCompletion(carapace.ActionMap{
24+
"remote": jj.ActionRemotes(),
25+
})
26+
2227
carapace.Gen(bookmark_trackCmd).PositionalAnyCompletion(
2328
jj.ActionRemoteBookmarks("").FilterArgs(),
2429
)

completers/common/jj_completer/cmd/bookmark_untrack.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,13 @@ func init() {
1616
carapace.Gen(bookmark_untrackCmd).Standalone()
1717

1818
bookmark_untrackCmd.Flags().BoolP("help", "h", false, "Print help (see more with '--help')")
19+
bookmark_untrackCmd.Flags().StringSlice("remote", nil, "Remote names to untrack")
1920
bookmarkCmd.AddCommand(bookmark_untrackCmd)
2021

22+
carapace.Gen(bookmark_untrackCmd).FlagCompletion(carapace.ActionMap{
23+
"remote": jj.ActionRemotes(),
24+
})
25+
2126
carapace.Gen(bookmark_untrackCmd).PositionalAnyCompletion(
2227
jj.ActionRemoteBookmarks("").FilterArgs(), // TODO tracked bookmarks
2328
)

completers/common/jj_completer/cmd/commit.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ func init() {
1717

1818
commitCmd.Flags().Bool("editor", false, "Open an editor to edit the change description")
1919
commitCmd.Flags().BoolP("help", "h", false, "Print help (see more with '--help')")
20-
commitCmd.Flags().BoolP("interactive", "i", false, "Interactively choose which changes to include in the first commit")
20+
commitCmd.Flags().BoolP("interactive", "i", false, "Interactively choose which changes to include in the current commit")
2121
commitCmd.Flags().StringSliceP("message", "m", nil, "The change description to use (don't open editor)")
2222
commitCmd.Flags().String("tool", "", "Specify diff editor to be used (implies --interactive)")
2323
rootCmd.AddCommand(commitCmd)

completers/common/jj_completer/cmd/duplicate.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ func init() {
2323
duplicateCmd.Flags().StringSliceP("insert-after", "A", nil, "The revision(s) to insert after (can be repeated to create a merge commit)")
2424
duplicateCmd.Flags().StringSliceP("insert-before", "B", nil, "The revision(s) to insert before (can be repeated to create a merge commit)")
2525
duplicateCmd.Flags().StringSliceP("onto", "o", nil, "The revision(s) to duplicate onto (can be repeated to create a merge commit)")
26-
duplicateCmd.Flag("d").Hidden = true
27-
duplicateCmd.Flag("destination").Hidden = true
2826
rootCmd.AddCommand(duplicateCmd)
2927

3028
duplicateCmd.MarkFlagsMutuallyExclusive(
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
package cmd
2+
3+
import (
4+
"github.com/carapace-sh/carapace"
5+
"github.com/carapace-sh/carapace-bin/pkg/actions/tools/jj"
6+
"github.com/spf13/cobra"
7+
)
8+
9+
var file_searchCmd = &cobra.Command{
10+
Use: "search",
11+
Short: "Search for content in files",
12+
Run: func(cmd *cobra.Command, args []string) {},
13+
}
14+
15+
func init() {
16+
carapace.Gen(file_searchCmd).Standalone()
17+
18+
file_searchCmd.Flags().BoolP("help", "h", false, "Print help (see more with '--help')")
19+
file_searchCmd.Flags().StringP("pattern", "p", "", "The glob pattern to search for")
20+
file_searchCmd.Flags().StringP("revision", "r", "", "The revision to search files in")
21+
file_searchCmd.MarkFlagRequired("pattern")
22+
fileCmd.AddCommand(file_searchCmd)
23+
24+
carapace.Gen(file_searchCmd).FlagCompletion(carapace.ActionMap{
25+
"revision": jj.ActionRevSets(jj.RevOption{}.Default()),
26+
})
27+
}

completers/common/jj_completer/cmd/git_remote_add.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ func init() {
1919

2020
git_remote_addCmd.Flags().String("fetch-tags", "", "Configure when to fetch tags")
2121
git_remote_addCmd.Flags().BoolP("help", "h", false, "Print help (see more with '--help')")
22+
git_remote_addCmd.Flags().String("push-url", "", "The URL used for push")
2223
git_remoteCmd.AddCommand(git_remote_addCmd)
2324

2425
carapace.Gen(git_remote_addCmd).FlagCompletion(carapace.ActionMap{

completers/common/jj_completer/cmd/git_remote_setUrl.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ var git_remote_setUrlCmd = &cobra.Command{
1616
func init() {
1717
carapace.Gen(git_remote_setUrlCmd).Standalone()
1818

19+
git_remote_setUrlCmd.Flags().String("fetch", "", "The URL or path to fetch from")
1920
git_remote_setUrlCmd.Flags().BoolP("help", "h", false, "Print help (see more with '--help')")
21+
git_remote_setUrlCmd.Flags().String("push", "", "The URL or path to push to")
2022
git_remoteCmd.AddCommand(git_remote_setUrlCmd)
2123

2224
carapace.Gen(git_remote_setUrlCmd).PositionalCompletion(

completers/common/jj_completer/cmd/interdiff.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ func init() {
1818

1919
interdiffCmd.Flags().Bool("color-words", false, "Show a word-level diff with changes indicated only by color")
2020
interdiffCmd.Flags().String("context", "", "Number of lines of context to show")
21-
interdiffCmd.Flags().StringP("from", "f", "@", "Show changes from this revision")
21+
interdiffCmd.Flags().StringP("from", "f", "@", "The first revision to compare (default: @)")
2222
interdiffCmd.Flags().Bool("git", false, "Show a Git-format diff")
2323
interdiffCmd.Flags().BoolP("help", "h", false, "Print help (see more with '--help')")
2424
interdiffCmd.Flags().BoolP("ignore-all-space", "w", false, "Ignore whitespace when comparing lines")
2525
interdiffCmd.Flags().BoolP("ignore-space-change", "b", false, "Ignore changes in amount of whitespace when comparing lines")
2626
interdiffCmd.Flags().Bool("name-only", false, "For each path, show only its path")
2727
interdiffCmd.Flags().Bool("stat", false, "Show a histogram of the changes")
2828
interdiffCmd.Flags().BoolP("summary", "s", false, "For each path, show only whether it was modified, added, or deleted")
29-
interdiffCmd.Flags().StringP("to", "t", "@", "Show changes to this revision")
29+
interdiffCmd.Flags().StringP("to", "t", "@", "The second revision to compare (default: @)")
3030
interdiffCmd.Flags().String("tool", "", "Generate diff by external command")
3131
interdiffCmd.Flags().Bool("types", false, "For each path, show only its type before and after")
3232
rootCmd.AddCommand(interdiffCmd)

completers/common/jj_completer/cmd/metaedit.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ func init() {
1616
carapace.Gen(metaeditCmd).Standalone()
1717

1818
metaeditCmd.Flags().String("author", "", "Set author to the provided string")
19-
metaeditCmd.Flags().String("author-timestamp", "", "Set the author date to the given date either human readable, eg Sun, 23 Jan 2000 01:23:45 JST) or as a time stamp, eg 2000-01-23T01:23:45+09:00)")
19+
metaeditCmd.Flags().String("author-timestamp", "", "Set the author date to the given date")
2020
metaeditCmd.Flags().Bool("force-rewrite", false, "Rewrite the commit, even if no other metadata changed")
2121
metaeditCmd.Flags().BoolP("help", "h", false, "Print help (see more with '--help')")
2222
metaeditCmd.Flags().StringSliceP("message", "m", nil, "Update the change description")

0 commit comments

Comments
 (0)