lib/awskeyring_command.rb in awskeyring-1.0.0 vs lib/awskeyring_command.rb in awskeyring-1.0.1
- old
+ new
@@ -13,10 +13,11 @@
class AwskeyringCommand < Thor # rubocop:disable Metrics/ClassLength
I18n.load_path = Dir.glob(File.join(File.realpath(__dir__), '..', 'i18n', '*.{yml,yaml}'))
I18n.backend.load_translations
map %w[--version -v] => :__version
+ map %w[--help -h] => :help
map ['init'] => :initialise
map ['adr'] => :add_role
map ['con'] => :console
map ['ls'] => :list
map ['lsr'] => :list_role
@@ -377,10 +378,10 @@
sub_cmd = sub_command(comp_line.split)
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
when '--path', '-p'
comp_len = 4