`vagrant ssh` -e flag is now -c [closes GH-323]

This commit is contained in:
Mitchell Hashimoto 2011-07-06 00:29:09 -07:00
parent 5e2e019b7c
commit 29688eb788
3 changed files with 7 additions and 5 deletions

View File

@ -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)

View File

@ -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

View File

@ -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