diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/hcl/app.rb | 4 | ||||
| -rw-r--r-- | lib/hcl/commands.rb | 3 | ||||
| -rw-r--r-- | lib/hcl/version.rb | 2 | 
3 files changed, 8 insertions, 1 deletions
| diff --git a/lib/hcl/app.rb b/lib/hcl/app.rb index 1ddc805..044b83d 100644 --- a/lib/hcl/app.rb +++ b/lib/hcl/app.rb @@ -11,6 +11,7 @@ module HCl      HCL_DIR = (ENV['HCL_DIR'] || "#{ENV['HOME']}/.hcl").freeze      SETTINGS_FILE = "#{HCL_DIR}/settings.yml".freeze +    ALIAS_LIST = "#{HCL_DIR}/aliases".freeze      CONFIG_FILE = "#{HCL_DIR}/config.yml".freeze      attr_reader :http @@ -187,6 +188,9 @@ EOM      end      def write_settings +      File.open(ALIAS_LIST, 'w') do |f| +        f.write aliases.join(' ') +      end        File.open(SETTINGS_FILE, 'w') do |f|         f.write @settings.to_yaml        end diff --git a/lib/hcl/commands.rb b/lib/hcl/commands.rb index 784f343..c753fbf 100644 --- a/lib/hcl/commands.rb +++ b/lib/hcl/commands.rb @@ -79,6 +79,9 @@ module HCl      def completion command=nil        command ||= $PROGRAM_NAME.split('/').last +      $stderr.puts \ +        "The hcl completion command is deprecated (and slow!), instead use something like:", +        "> complete -W `cat #{HCl::App::ALIAS_LIST}` #{command}"        %[complete -W "#{aliases.join ' '}" #{command}]      end diff --git a/lib/hcl/version.rb b/lib/hcl/version.rb index ee35062..f62a0b6 100644 --- a/lib/hcl/version.rb +++ b/lib/hcl/version.rb @@ -1,3 +1,3 @@  module HCl -  VERSION = '0.4.11' +  VERSION = '0.4.12'  end | 
