diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f61e8957..40715b6bc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,8 @@ - Host only network now properly works on multiple adapters. [GH-365] - Can now specify owner/group for regular shared folders. [GH-350] - `ssh_config` host name will use VM name if given. [GH-332] + - `ssh` `-e` flag changed to `-c` to align with `ssh` standard + behavior. [GH-323] ## 0.7.6 (July 2, 2011) diff --git a/lib/vagrant/command/ssh.rb b/lib/vagrant/command/ssh.rb index c249885b7..2e709cfa6 100644 --- a/lib/vagrant/command/ssh.rb +++ b/lib/vagrant/command/ssh.rb @@ -1,11 +1,11 @@ module Vagrant module Command class SSHCommand < NamedBase - class_option :execute, :type => :string, :default => false, :aliases => "-e" + class_option :command, :type => :string, :default => false, :aliases => "-c" register "ssh", "SSH into the currently running Vagrant environment." def execute - if options[:execute] + if options[:command] ssh_execute else ssh_connect @@ -16,8 +16,8 @@ module Vagrant def ssh_execute ssh_vm.ssh.execute do |ssh| - ssh_vm.env.ui.info I18n.t("vagrant.commands.ssh.execute", :command => options[:execute]) - ssh.exec!(options[:execute]) do |channel, type, data| + ssh_vm.env.ui.info I18n.t("vagrant.commands.ssh.command", :command => options[:command]) + ssh.exec!(options[:command]) do |channel, type, data| ssh_vm.env.ui.info "#{data}" end end diff --git a/templates/locales/en.yml b/templates/locales/en.yml index f51007576..0df478d4e 100644 --- a/templates/locales/en.yml +++ b/templates/locales/en.yml @@ -188,7 +188,7 @@ en: box: no_installed_boxes: "There are no installed boxes! Use `vagrant box add` to add some." ssh: - execute: "Execute: %{command}" + command: "Command: %{command}" status: aborted: |- The VM is in an aborted state. This means that it was abruptly