From c67947d2b00d6b77ef93c13955d122412f64c74b Mon Sep 17 00:00:00 2001 From: Tristan Morgan Date: Wed, 22 May 2019 16:42:00 +1000 Subject: [PATCH] auto-complete the --version --- lib/awskeyring_command.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/awskeyring_command.rb b/lib/awskeyring_command.rb index e52f711..f5265fa 100644 --- a/lib/awskeyring_command.rb +++ b/lib/awskeyring_command.rb @@ -15,6 +15,7 @@ class AwskeyringCommand < Thor # rubocop:disable Metrics/ClassLength I18n.backend.load_translations map %w[--version -v] => :__version + map %w[--help -h] => :help map ['init'] => :initialise map ['adr'] => :add_role map ['con'] => :console @@ -379,7 +380,7 @@ def comp_type(comp_line:, curr:, prev:) comp_len = 3 if curr.start_with?('-') case prev - when 'help' + when 'help', File.basename($PROGRAM_NAME) comp_len = 0 when 'remove-role', '-r', 'rmr' comp_len = 2