ct create: Listing available templates via ct create -l
This commit is contained in:
parent
f816ac3bc2
commit
1ff6ee163a
1 changed files with 4 additions and 0 deletions
|
@ -57,7 +57,11 @@ def cli_ct
|
||||||
if %w[-h --help].include? template
|
if %w[-h --help].include? template
|
||||||
STDERR.puts "Usage: ct create TEMPLATE -h # Shows template-related options"
|
STDERR.puts "Usage: ct create TEMPLATE -h # Shows template-related options"
|
||||||
STDERR.puts " ct create TEMPLATE [OPTIONS] # Creates a container"
|
STDERR.puts " ct create TEMPLATE [OPTIONS] # Creates a container"
|
||||||
|
STDERR.puts " ct create -l # Listing available templates"
|
||||||
exit 1
|
exit 1
|
||||||
|
elsif %w[-l --list].include? template
|
||||||
|
STDERR.puts PVE::CTTemplate.constants.reject {|c|:Base==c}.map {|c|c.to_s.titlecase.dasherize.downcase}
|
||||||
|
exit 0
|
||||||
end
|
end
|
||||||
ctopts = {}
|
ctopts = {}
|
||||||
OptionParser.new do |opts|
|
OptionParser.new do |opts|
|
||||||
|
|
Loading…
Reference in a new issue