Files
ubicloud/cli-commands/vm/post/sftp.rb
Jeremy Evans 9fc326c965 Minor CLI help improvements
* Spaces around `|` between name and id.

* `Get program help` -> `Get command help`

* `private-subnet-id` -> `ps-id`
2025-03-13 09:20:15 -07:00

17 lines
418 B
Ruby

# frozen_string_literal: true
UbiCli.on("vm").run_on("sftp") do
desc "Copy files to or from virtual machine using `sftp`"
skip_option_parsing("ubi vm (location/vm-name | vm-id) [options] sftp [sftp-options]")
args(0...)
run do |argv, opts|
handle_ssh(opts) do |user:, address:|
address = "[#{address}]" if address.include?(":")
["sftp", *argv, "--", "#{user}@#{address}"]
end
end
end