Skip to content

Commit

Permalink
added git-archive-file and git-authors
Browse files Browse the repository at this point in the history
  • Loading branch information
rsteube committed Jan 2, 2023
1 parent 8ab2c92 commit 4889388
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 4 deletions.
22 changes: 22 additions & 0 deletions completers/git-archive-file_completer/cmd/root.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package cmd

import (
"github.com/rsteube/carapace"
"github.com/spf13/cobra"
)

var rootCmd = &cobra.Command{
Use: "git-archive-file",
Short: "Export the current HEAD of the git repository to an archive",
Long: "https://github.com/tj/git-extras/blob/master/Commands.md#git-archive-file",
Run: func(cmd *cobra.Command, args []string) {},
}

func Execute() error {
return rootCmd.Execute()
}
func init() {
carapace.Gen(rootCmd).Standalone()

rootCmd.Flags().Bool("help", false, "Display help message")
}
7 changes: 7 additions & 0 deletions completers/git-archive-file_completer/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package main

import "github.com/rsteube/carapace-bin/completers/git-archive-file_completer/cmd"

func main() {
cmd.Execute()
}
24 changes: 24 additions & 0 deletions completers/git-authors_completer/cmd/root.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package cmd

import (
"github.com/rsteube/carapace"
"github.com/spf13/cobra"
)

var rootCmd = &cobra.Command{
Use: "git-authors",
Short: "Generate authors report",
Long: "https://github.com/tj/git-extras/blob/master/Commands.md#git-authors",
Run: func(cmd *cobra.Command, args []string) {},
}

func Execute() error {
return rootCmd.Execute()
}
func init() {
carapace.Gen(rootCmd).Standalone()

rootCmd.Flags().Bool("help", false, "Display help message")
rootCmd.Flags().BoolP("list", "l", false, "Show authors")
rootCmd.Flags().Bool("no-email", false, "Don't show author's email")
}
7 changes: 7 additions & 0 deletions completers/git-authors_completer/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package main

import "github.com/rsteube/carapace-bin/completers/git-authors_completer/cmd"

func main() {
cmd.Execute()
}
8 changes: 4 additions & 4 deletions pkg/actions/ps/ps.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func ActionKillSignals() carapace.Action {
"XCPU", "CPU time limit exceeded", styles.CarapaceBin.KillSignalCore,
"XFSZ", "File size limit exceeded", styles.CarapaceBin.KillSignalCore,
)
})
}).Tag("kill signals")
}

// ActionProcessExecutables completes executable names of current processes
Expand All @@ -66,7 +66,7 @@ func ActionProcessExecutables() carapace.Action {
}
return carapace.ActionValuesDescribed(executables...)
}
})
}).Tag("process executables")
}

// ActionProcessIds completes proces IDs
Expand All @@ -84,7 +84,7 @@ func ActionProcessIds() carapace.Action {
}
return carapace.ActionValuesDescribed(ids...)
}
})
}).Tag("process ids")
}

// ActionProcessStates completes linux process states
Expand All @@ -102,5 +102,5 @@ func ActionProcessStates() carapace.Action {
"X", "dead (should never be seen)",
"Z", "defunct (zombie) process, terminated but not reaped by its parent",
"t", "stopped by debugger during the tracing",
)
).Tag("process states")
}

0 comments on commit 4889388

Please sign in to comment.