summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/hcl/commands.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/hcl/commands.rb b/lib/hcl/commands.rb
index 328981e..784f343 100644
--- a/lib/hcl/commands.rb
+++ b/lib/hcl/commands.rb
@@ -77,7 +77,8 @@ module HCl
end
end
- def completion command=$PROGRAM_NAME
+ def completion command=nil
+ command ||= $PROGRAM_NAME.split('/').last
%[complete -W "#{aliases.join ' '}" #{command}]
end