mirror of
https://github.com/ddworken/hishtory.git
synced 2025-02-02 11:39:24 +01:00
Add aliases for plural config options in case people type the singular version
This commit is contained in:
parent
e3b8545116
commit
c735fee3d5
@ -21,9 +21,10 @@ var configAddCmd = &cobra.Command{
|
||||
}
|
||||
|
||||
var addCustomColumnsCmd = &cobra.Command{
|
||||
Use: "custom-columns",
|
||||
Short: "Add a custom column",
|
||||
Args: cobra.ExactArgs(2),
|
||||
Use: "custom-columns",
|
||||
Aliases: []string{"custom-column"},
|
||||
Short: "Add a custom column",
|
||||
Args: cobra.ExactArgs(2),
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
columnName := args[0]
|
||||
command := args[1]
|
||||
@ -43,9 +44,10 @@ var addCustomColumnsCmd = &cobra.Command{
|
||||
}
|
||||
|
||||
var addDisplayedColumnsCmd = &cobra.Command{
|
||||
Use: "displayed-columns",
|
||||
Short: "Add a column to be displayed",
|
||||
Args: cobra.ExactArgs(1),
|
||||
Use: "displayed-columns",
|
||||
Aliases: []string{"displayed-column"},
|
||||
Short: "Add a column to be displayed",
|
||||
Args: cobra.ExactArgs(1),
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
ctx := hctx.MakeContext()
|
||||
config := hctx.GetConf(ctx)
|
||||
|
@ -20,9 +20,10 @@ var configDeleteCmd = &cobra.Command{
|
||||
}
|
||||
|
||||
var deleteCustomColumnsCmd = &cobra.Command{
|
||||
Use: "custom-columns",
|
||||
Short: "Delete a custom column",
|
||||
Args: cobra.ExactArgs(1),
|
||||
Use: "custom-columns",
|
||||
Aliases: []string{"custom-column"},
|
||||
Short: "Delete a custom column",
|
||||
Args: cobra.ExactArgs(1),
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
ctx := hctx.MakeContext()
|
||||
config := hctx.GetConf(ctx)
|
||||
@ -56,9 +57,10 @@ var deleteCustomColumnsCmd = &cobra.Command{
|
||||
},
|
||||
}
|
||||
var deleteDisplayedColumnCommand = &cobra.Command{
|
||||
Use: "displayed-columns",
|
||||
Short: "Delete a displayed column",
|
||||
Args: cobra.MinimumNArgs(1),
|
||||
Use: "displayed-columns",
|
||||
Aliases: []string{"displayed-column"},
|
||||
Short: "Delete a displayed column",
|
||||
Args: cobra.MinimumNArgs(1),
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
ctx := hctx.MakeContext()
|
||||
config := hctx.GetConf(ctx)
|
||||
|
@ -85,8 +85,9 @@ var getBetaModeCmd = &cobra.Command{
|
||||
}
|
||||
|
||||
var getDisplayedColumnsCmd = &cobra.Command{
|
||||
Use: "displayed-columns",
|
||||
Short: "The list of columns that hishtory displays",
|
||||
Use: "displayed-columns",
|
||||
Aliases: []string{"displayed-column"},
|
||||
Short: "The list of columns that hishtory displays",
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
ctx := hctx.MakeContext()
|
||||
config := hctx.GetConf(ctx)
|
||||
@ -112,8 +113,9 @@ var getTimestampFormatCmd = &cobra.Command{
|
||||
}
|
||||
|
||||
var getCustomColumnsCmd = &cobra.Command{
|
||||
Use: "custom-columns",
|
||||
Short: "The list of custom columns that hishtory is tracking",
|
||||
Use: "custom-columns",
|
||||
Aliases: []string{"custom-column"},
|
||||
Short: "The list of custom columns that hishtory is tracking",
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
ctx := hctx.MakeContext()
|
||||
config := hctx.GetConf(ctx)
|
||||
|
@ -126,9 +126,10 @@ var setHighlightMatchesCmd = &cobra.Command{
|
||||
}
|
||||
|
||||
var setDisplayedColumnsCmd = &cobra.Command{
|
||||
Use: "displayed-columns",
|
||||
Short: "The list of columns that hishtory displays",
|
||||
Args: cobra.MinimumNArgs(1),
|
||||
Use: "displayed-columns",
|
||||
Aliases: []string{"displayed-column"},
|
||||
Short: "The list of columns that hishtory displays",
|
||||
Args: cobra.MinimumNArgs(1),
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
ctx := hctx.MakeContext()
|
||||
config := hctx.GetConf(ctx)
|
||||
|
Loading…
Reference in New Issue
Block a user