mirror of
https://github.com/ddworken/hishtory.git
synced 2025-06-19 19:37:59 +02: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{
|
var addCustomColumnsCmd = &cobra.Command{
|
||||||
Use: "custom-columns",
|
Use: "custom-columns",
|
||||||
Short: "Add a custom column",
|
Aliases: []string{"custom-column"},
|
||||||
Args: cobra.ExactArgs(2),
|
Short: "Add a custom column",
|
||||||
|
Args: cobra.ExactArgs(2),
|
||||||
Run: func(cmd *cobra.Command, args []string) {
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
columnName := args[0]
|
columnName := args[0]
|
||||||
command := args[1]
|
command := args[1]
|
||||||
@ -43,9 +44,10 @@ var addCustomColumnsCmd = &cobra.Command{
|
|||||||
}
|
}
|
||||||
|
|
||||||
var addDisplayedColumnsCmd = &cobra.Command{
|
var addDisplayedColumnsCmd = &cobra.Command{
|
||||||
Use: "displayed-columns",
|
Use: "displayed-columns",
|
||||||
Short: "Add a column to be displayed",
|
Aliases: []string{"displayed-column"},
|
||||||
Args: cobra.ExactArgs(1),
|
Short: "Add a column to be displayed",
|
||||||
|
Args: cobra.ExactArgs(1),
|
||||||
Run: func(cmd *cobra.Command, args []string) {
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
ctx := hctx.MakeContext()
|
ctx := hctx.MakeContext()
|
||||||
config := hctx.GetConf(ctx)
|
config := hctx.GetConf(ctx)
|
||||||
|
@ -20,9 +20,10 @@ var configDeleteCmd = &cobra.Command{
|
|||||||
}
|
}
|
||||||
|
|
||||||
var deleteCustomColumnsCmd = &cobra.Command{
|
var deleteCustomColumnsCmd = &cobra.Command{
|
||||||
Use: "custom-columns",
|
Use: "custom-columns",
|
||||||
Short: "Delete a custom column",
|
Aliases: []string{"custom-column"},
|
||||||
Args: cobra.ExactArgs(1),
|
Short: "Delete a custom column",
|
||||||
|
Args: cobra.ExactArgs(1),
|
||||||
Run: func(cmd *cobra.Command, args []string) {
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
ctx := hctx.MakeContext()
|
ctx := hctx.MakeContext()
|
||||||
config := hctx.GetConf(ctx)
|
config := hctx.GetConf(ctx)
|
||||||
@ -56,9 +57,10 @@ var deleteCustomColumnsCmd = &cobra.Command{
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
var deleteDisplayedColumnCommand = &cobra.Command{
|
var deleteDisplayedColumnCommand = &cobra.Command{
|
||||||
Use: "displayed-columns",
|
Use: "displayed-columns",
|
||||||
Short: "Delete a displayed column",
|
Aliases: []string{"displayed-column"},
|
||||||
Args: cobra.MinimumNArgs(1),
|
Short: "Delete a displayed column",
|
||||||
|
Args: cobra.MinimumNArgs(1),
|
||||||
Run: func(cmd *cobra.Command, args []string) {
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
ctx := hctx.MakeContext()
|
ctx := hctx.MakeContext()
|
||||||
config := hctx.GetConf(ctx)
|
config := hctx.GetConf(ctx)
|
||||||
|
@ -85,8 +85,9 @@ var getBetaModeCmd = &cobra.Command{
|
|||||||
}
|
}
|
||||||
|
|
||||||
var getDisplayedColumnsCmd = &cobra.Command{
|
var getDisplayedColumnsCmd = &cobra.Command{
|
||||||
Use: "displayed-columns",
|
Use: "displayed-columns",
|
||||||
Short: "The list of columns that hishtory displays",
|
Aliases: []string{"displayed-column"},
|
||||||
|
Short: "The list of columns that hishtory displays",
|
||||||
Run: func(cmd *cobra.Command, args []string) {
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
ctx := hctx.MakeContext()
|
ctx := hctx.MakeContext()
|
||||||
config := hctx.GetConf(ctx)
|
config := hctx.GetConf(ctx)
|
||||||
@ -112,8 +113,9 @@ var getTimestampFormatCmd = &cobra.Command{
|
|||||||
}
|
}
|
||||||
|
|
||||||
var getCustomColumnsCmd = &cobra.Command{
|
var getCustomColumnsCmd = &cobra.Command{
|
||||||
Use: "custom-columns",
|
Use: "custom-columns",
|
||||||
Short: "The list of custom columns that hishtory is tracking",
|
Aliases: []string{"custom-column"},
|
||||||
|
Short: "The list of custom columns that hishtory is tracking",
|
||||||
Run: func(cmd *cobra.Command, args []string) {
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
ctx := hctx.MakeContext()
|
ctx := hctx.MakeContext()
|
||||||
config := hctx.GetConf(ctx)
|
config := hctx.GetConf(ctx)
|
||||||
|
@ -126,9 +126,10 @@ var setHighlightMatchesCmd = &cobra.Command{
|
|||||||
}
|
}
|
||||||
|
|
||||||
var setDisplayedColumnsCmd = &cobra.Command{
|
var setDisplayedColumnsCmd = &cobra.Command{
|
||||||
Use: "displayed-columns",
|
Use: "displayed-columns",
|
||||||
Short: "The list of columns that hishtory displays",
|
Aliases: []string{"displayed-column"},
|
||||||
Args: cobra.MinimumNArgs(1),
|
Short: "The list of columns that hishtory displays",
|
||||||
|
Args: cobra.MinimumNArgs(1),
|
||||||
Run: func(cmd *cobra.Command, args []string) {
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
ctx := hctx.MakeContext()
|
ctx := hctx.MakeContext()
|
||||||
config := hctx.GetConf(ctx)
|
config := hctx.GetConf(ctx)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user