summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZack Hobson2013-12-30 10:03:36 -0800
committerZack Hobson2013-12-30 10:03:36 -0800
commit71e9ce703a66eaa196aeb0ac52725dff24cd99a5 (patch)
tree9cda9d558931a4f48203850c89a0609edfaf7abb
parent3f7dc80db0490574a18f86e4e72d12f53f919b39 (diff)
downloadhcl-71e9ce703a66eaa196aeb0ac52725dff24cd99a5.tar.bz2
fix completion commandv0.4.10
-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