-
-
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.
Merge pull request #2626 from aftix/push-pzmoxmuuokqs
jj_completer: updated for v0.24.0
- Loading branch information
Showing
13 changed files
with
100 additions
and
97 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/carapace-sh/carapace" | ||
"github.com/carapace-sh/carapace-bin/pkg/actions/tools/jj" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var absorbCmd = &cobra.Command{ | ||
Use: "absorb [OPTIONS] [PATHS]...", | ||
Short: "Move changes from a revision into the stack of mutable revisions", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(absorbCmd).Standalone() | ||
|
||
absorbCmd.Flags().StringP("from", "f", "@", "Source revision to absorb from") | ||
absorbCmd.Flags().BoolP("help", "h", false, "Print help (see more with '--help')") | ||
absorbCmd.Flags().StringP("into", "t", "mutable()", "Destination revisions to absorb into") | ||
absorbCmd.Flags().String("to", "mutable()", "Alias for --into") | ||
rootCmd.AddCommand(absorbCmd) | ||
|
||
absorbCmd.MarkFlagsMutuallyExclusive("into", "to") | ||
|
||
carapace.Gen(absorbCmd).FlagCompletion(carapace.ActionMap{ | ||
"from": jj.ActionRevs(jj.RevOption{}.Default()), | ||
"into": jj.ActionRevs(jj.RevOption{}.Default()), | ||
"to": jj.ActionRevs(jj.RevOption{}.Default()), | ||
}) | ||
|
||
carapace.Gen(absorbCmd).PositionalAnyCompletion( | ||
carapace.ActionCallback(func(carapace.Context) carapace.Action { | ||
return jj.ActionRevFiles(absorbCmd.Flag("from").Value.String()) | ||
}), | ||
) | ||
} |
This file was deleted.
Oops, something went wrong.
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
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,31 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/carapace-sh/carapace" | ||
"github.com/carapace-sh/carapace-bridge/pkg/actions/bridge" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
var util_execCmd = &cobra.Command{ | ||
Use: "exec", | ||
Short: "Execute an external command via jj", | ||
Run: func(cmd *cobra.Command, args []string) {}, | ||
} | ||
|
||
func init() { | ||
carapace.Gen(util_execCmd).Standalone() | ||
|
||
util_execCmd.Flags().BoolP("help", "h", false, "Print help (see more with '--help')") | ||
utilCmd.AddCommand(util_execCmd) | ||
|
||
carapace.Gen(util_execCmd).PositionalCompletion( | ||
carapace.Batch( | ||
carapace.ActionExecutables(), | ||
carapace.ActionFiles(), | ||
).ToA(), | ||
) | ||
|
||
carapace.Gen(util_execCmd).PositionalAnyCompletion( | ||
bridge.ActionCarapaceBin(), | ||
) | ||
} |
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