From 42440f913920e041829b0eef4740169bdf82a681 Mon Sep 17 00:00:00 2001 From: wpioneer Date: Sat, 13 Oct 2018 18:53:53 +0300 Subject: [PATCH 1/2] Add shortcuts --- cmd/list.go | 1 + cmd/listAddresses.go | 1 + cmd/listContacts.go | 1 + cmd/listFeed.go | 1 + cmd/listGoals.go | 1 + cmd/listMandates.go | 1 + cmd/listPayments.go | 1 + cmd/listTransactions.go | 1 + cmd/show.go | 1 + cmd/showAccount.go | 1 + cmd/showBalance.go | 1 + cmd/showCard.go | 1 + cmd/transfer.go | 1 + cmd/transferFrom.go | 1 + cmd/transferTo.go | 1 + 15 files changed, 15 insertions(+) diff --git a/cmd/list.go b/cmd/list.go index a74c218..389e188 100644 --- a/cmd/list.go +++ b/cmd/list.go @@ -8,6 +8,7 @@ import ( var listCmd = &cobra.Command{ Use: "list", Short: "Display a list of items based on sub-command", + Aliases: []string{"l"}, } func init() { diff --git a/cmd/listAddresses.go b/cmd/listAddresses.go index 9ffa329..8acc412 100644 --- a/cmd/listAddresses.go +++ b/cmd/listAddresses.go @@ -12,6 +12,7 @@ import ( var listAddressesCmd = &cobra.Command{ Use: "addresses", Short: "List addresses", + Aliases: []string{"a"}, Run: listAddresses, Args: cobra.NoArgs, } diff --git a/cmd/listContacts.go b/cmd/listContacts.go index 0d2db2c..b65a477 100644 --- a/cmd/listContacts.go +++ b/cmd/listContacts.go @@ -12,6 +12,7 @@ import ( var listContactsCmd = &cobra.Command{ Use: "contacts", Short: "List contacts", + Aliases: []string{"c"}, Run: listContacts, Args: cobra.NoArgs, } diff --git a/cmd/listFeed.go b/cmd/listFeed.go index b87bc20..bc99c42 100644 --- a/cmd/listFeed.go +++ b/cmd/listFeed.go @@ -13,6 +13,7 @@ import ( var listFeedCmd = &cobra.Command{ Use: "feed", Short: "List recent feed items", + Aliases: []string{"f"}, Run: listFeed, } diff --git a/cmd/listGoals.go b/cmd/listGoals.go index 73fab86..64a9fb2 100644 --- a/cmd/listGoals.go +++ b/cmd/listGoals.go @@ -12,6 +12,7 @@ import ( var listGoalsCmd = &cobra.Command{ Use: "goals", Short: "List savings goals", + Aliases: []string{"g"}, Run: listGoals, Args: cobra.NoArgs, } diff --git a/cmd/listMandates.go b/cmd/listMandates.go index 4244596..059df5d 100644 --- a/cmd/listMandates.go +++ b/cmd/listMandates.go @@ -12,6 +12,7 @@ import ( var listMandatesCmd = &cobra.Command{ Use: "mandates", Short: "List Direct Debit mandates", + Aliases: []string{"m"}, Run: listMandates, Args: cobra.NoArgs, } diff --git a/cmd/listPayments.go b/cmd/listPayments.go index 745f947..defada7 100644 --- a/cmd/listPayments.go +++ b/cmd/listPayments.go @@ -12,6 +12,7 @@ import ( var listPaymentsCmd = &cobra.Command{ Use: "payments", Short: "List payments", + Aliases: []string{"p"}, Run: listPayments, Args: cobra.NoArgs, } diff --git a/cmd/listTransactions.go b/cmd/listTransactions.go index c358dce..0c2ffec 100644 --- a/cmd/listTransactions.go +++ b/cmd/listTransactions.go @@ -13,6 +13,7 @@ import ( var listTransactionsCmd = &cobra.Command{ Use: "txns", Short: "List recent transactions", + Aliases: []string{"t"}, Run: listTransactions, } diff --git a/cmd/show.go b/cmd/show.go index dcd48fc..2d9e1e6 100644 --- a/cmd/show.go +++ b/cmd/show.go @@ -7,6 +7,7 @@ import ( var showCmd = &cobra.Command{ Use: "show", Short: "Display a table of information based on sub-command", + Aliases: []string{"s"}, Long: `Show is a command that queries the Starling Bank API and displays a table of information based on the associated sub-command. For example: diff --git a/cmd/showAccount.go b/cmd/showAccount.go index 4d9e545..0e32ea6 100644 --- a/cmd/showAccount.go +++ b/cmd/showAccount.go @@ -11,6 +11,7 @@ import ( var showAccountCmd = &cobra.Command{ Use: "account", Short: "Show an account summary", + Aliases: []string{"a"}, Run: showAccount, Args: cobra.NoArgs, } diff --git a/cmd/showBalance.go b/cmd/showBalance.go index 62f925d..1d63672 100644 --- a/cmd/showBalance.go +++ b/cmd/showBalance.go @@ -11,6 +11,7 @@ import ( var showBalanceCmd = &cobra.Command{ Use: "balance", Short: "Show a summary of your balance", + Aliases: []string{"b"}, Run: showBalance, Args: cobra.NoArgs, } diff --git a/cmd/showCard.go b/cmd/showCard.go index da5c681..0efb0b0 100644 --- a/cmd/showCard.go +++ b/cmd/showCard.go @@ -11,6 +11,7 @@ import ( var showCardCmd = &cobra.Command{ Use: "card", Short: "Show your card details", + Aliases: []string{"c"}, Run: showCard, Args: cobra.NoArgs, } diff --git a/cmd/transfer.go b/cmd/transfer.go index f4aa53b..5abdd31 100644 --- a/cmd/transfer.go +++ b/cmd/transfer.go @@ -6,6 +6,7 @@ import ( var transferCmd = &cobra.Command{ Use: "transfer", + Aliases: []string{"t"}, Short: "Transfer money to/from a savings goal", Args: cobra.MinimumNArgs(1), } diff --git a/cmd/transferFrom.go b/cmd/transferFrom.go index 61d6bc5..59af424 100644 --- a/cmd/transferFrom.go +++ b/cmd/transferFrom.go @@ -14,6 +14,7 @@ import ( var transferFromCmd = &cobra.Command{ Use: "from", + Aliases: []string{"f"}, Short: "Transfer money from a savings goal", Args: cobra.ExactArgs(2), Run: transferFrom, diff --git a/cmd/transferTo.go b/cmd/transferTo.go index afa7ea1..2692f19 100644 --- a/cmd/transferTo.go +++ b/cmd/transferTo.go @@ -16,6 +16,7 @@ import ( var transferToCmd = &cobra.Command{ Use: "to", + Aliases: []string{"t"}, Short: "Transfer money to a savings goal", Args: cobra.ExactArgs(2), Run: transferTo, From caab612d423aae27174a1882b8ddf80ea44d07c2 Mon Sep 17 00:00:00 2001 From: wpioneer Date: Sat, 13 Oct 2018 19:02:20 +0300 Subject: [PATCH 2/2] Add shortcuts --- cmd/listTransactionsCard.go | 1 + cmd/listTransactionsDD.go | 1 + cmd/listTransactionsFPSIn.go | 1 + cmd/listTransactionsFPSOut.go | 1 + 4 files changed, 4 insertions(+) diff --git a/cmd/listTransactionsCard.go b/cmd/listTransactionsCard.go index dffd345..558c56c 100644 --- a/cmd/listTransactionsCard.go +++ b/cmd/listTransactionsCard.go @@ -12,6 +12,7 @@ import ( var listTransactionsCardCmd = &cobra.Command{ Use: "card", Short: "List card transactions", + Aliases: []string{"c"}, Run: listTransactionsCard, Args: cobra.NoArgs, } diff --git a/cmd/listTransactionsDD.go b/cmd/listTransactionsDD.go index 6e5a30a..b8510f6 100644 --- a/cmd/listTransactionsDD.go +++ b/cmd/listTransactionsDD.go @@ -12,6 +12,7 @@ import ( var listTransactionsDDCmd = &cobra.Command{ Use: "dd", Short: "List direct-debit transactions", + Aliases: []string{"d"}, Run: listTransactionsDD, Args: cobra.NoArgs, } diff --git a/cmd/listTransactionsFPSIn.go b/cmd/listTransactionsFPSIn.go index 498214b..fe8a768 100644 --- a/cmd/listTransactionsFPSIn.go +++ b/cmd/listTransactionsFPSIn.go @@ -12,6 +12,7 @@ import ( var listTransactionsFPSInCmd = &cobra.Command{ Use: "fpsIn", Short: "List inbound faster payments transactions", + Aliases: []string{"i"}, Run: listTransactionsFPSIn, Args: cobra.NoArgs, } diff --git a/cmd/listTransactionsFPSOut.go b/cmd/listTransactionsFPSOut.go index 41ab6e6..f5a6550 100644 --- a/cmd/listTransactionsFPSOut.go +++ b/cmd/listTransactionsFPSOut.go @@ -12,6 +12,7 @@ import ( var listTransactionsFPSOutCmd = &cobra.Command{ Use: "fpsOut", Short: "List outbound faster payments transactions", + Aliases: []string{"o"}, Run: listTransactionsFPSOut, Args: cobra.NoArgs, }