Skip to content

Commit

Permalink
Merge pull request #2523 from aftix/jj_v0.21.0
Browse files Browse the repository at this point in the history
jj_completer: Updated jujutsu completer to version 0.21.0 .
  • Loading branch information
rsteube authored Sep 5, 2024
2 parents 4b3787e + 00adf93 commit 922e646
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,19 @@ import (
"github.com/spf13/cobra"
)

var untrackCmd = &cobra.Command{
var file_untrackCmd = &cobra.Command{
Use: "untrack [OPTIONS] <PATHS>...",
Short: "Stop tracking specified paths in the working copy",
Run: func(cmd *cobra.Command, args []string) {},
}

func init() {
carapace.Gen(untrackCmd).Standalone()
carapace.Gen(file_untrackCmd).Standalone()

untrackCmd.Flags().BoolP("help", "h", false, "Print help (see more with '--help')")
rootCmd.AddCommand(untrackCmd)
file_untrackCmd.Flags().BoolP("help", "h", false, "Print help (see more with '--help')")
fileCmd.AddCommand(file_untrackCmd)

carapace.Gen(untrackCmd).PositionalAnyCompletion(
carapace.Gen(file_untrackCmd).PositionalAnyCompletion(
carapace.ActionFiles().FilterArgs(),
)
}
5 changes: 4 additions & 1 deletion completers/jj_completer/cmd/next.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,13 @@ func init() {
carapace.Gen(nextCmd).Standalone()

nextCmd.Flags().Bool("conflict", false, "Jump to the next conflicted descendant")
nextCmd.Flags().Bool("edit", false, "Instead of creating a new working-copy commit on top of the target commit (like `jj new`), edit the target commit directly (like `jj edit`)")
nextCmd.Flags().BoolP("edit", "e", false, "Instead of creating a new working-copy commit on top of the target commit (like `jj new`), edit the target commit directly (like `jj edit`)")
nextCmd.Flags().BoolP("help", "h", false, "Print help (see more with '--help')")
nextCmd.Flags().Bool("no-edit", false, "Instead of editing the target commit directly (like `jj edit`), create a new working-copy commit on top of the target commit (like `jj new`)")
rootCmd.AddCommand(nextCmd)

nextCmd.MarkFlagsMutuallyExclusive("edit", "no-edit")

carapace.Gen(nextCmd).PositionalCompletion(
jj.ActionNextCommits(100),
)
Expand Down
5 changes: 4 additions & 1 deletion completers/jj_completer/cmd/prev.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,13 @@ func init() {
carapace.Gen(prevCmd).Standalone()

prevCmd.Flags().Bool("conflict", false, "Jump to the next conflicted descendant")
prevCmd.Flags().Bool("edit", false, "Edit the parent directly, instead of moving the working-copy commit")
prevCmd.Flags().BoolP("edit", "e", false, "Edit the parent directly, instead of moving the working-copy commit")
prevCmd.Flags().BoolP("help", "h", false, "Print help (see more with '--help')")
prevCmd.Flags().Bool("no-edit", false, "Instead of editing the target commit directly (like `jj edit`), create a new working-copy commit on top of the target commit (like `jj new`)")
rootCmd.AddCommand(prevCmd)

prevCmd.MarkFlagsMutuallyExclusive("edit", "no-edit")

carapace.Gen(prevCmd).PositionalCompletion(
jj.ActionPrevCommits(100),
)
Expand Down

0 comments on commit 922e646

Please sign in to comment.