]> git.proxmox.com Git - pve-manager.git/commitdiff
pvenode: allow replying on samle line on interactive questions
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Sat, 2 May 2020 16:29:15 +0000 (18:29 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Sun, 3 May 2020 12:10:17 +0000 (14:10 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
PVE/CLI/pvenode.pm

index 0efdcd56ed00605c62509dd7186a36cf013efbfe..a33fcd93179007864a6f48351cc17ce8753c16db 100644 (file)
@@ -95,11 +95,11 @@ __PACKAGE__->register_method({
 
            my $term = Term::ReadLine->new('pvenode');
            my $get_dir_selection = sub {
-               my $selection = $term->readline("Enter selection:\n");
+               my $selection = $term->readline("Enter selection: ");
                if ($selection =~ /^(\d+)$/) {
                    $selection = $1;
                    if ($selection == $i) {
-                       $param->{directory} = $term->readline("Enter URL:\n");
+                       $param->{directory} = $term->readline("Enter custom URL: ");
                        return;
                    } elsif ($selection < $i && $selection >= 0) {
                        $param->{directory} = $directories->[$selection]->{url};
@@ -121,7 +121,7 @@ __PACKAGE__->register_method({
        if ($tos) {
            print "Terms of Service: $tos\n";
            my $term = Term::ReadLine->new('pvenode');
-           my $agreed = $term->readline('Do you agree to the above terms? [y|N]');
+           my $agreed = $term->readline('Do you agree to the above terms? [y|N]');
            die "Cannot continue without agreeing to ToS, aborting.\n"
                if ($agreed !~ /^y$/i);