There is no need for a separate class now. All of the files in cli-commands now use UbiCli, instead of a mix of UbiCli and UbiRodish.
15 lines
358 B
Ruby
15 lines
358 B
Ruby
# frozen_string_literal: true
|
|
|
|
UbiCli.on("vm").run_on("sftp") do
|
|
skip_option_parsing("ubi vm location/(vm-name|_vm-ubid) [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
|