summaryrefslogtreecommitdiffstats
path: root/fish/guestfish.pod
diff options
context:
space:
mode:
authorRichard Jones <rjones@redhat.com>2010-08-28 12:49:55 +0100
committerRichard Jones <rjones@redhat.com>2010-09-01 14:20:02 +0100
commit54837f6d7ba83178625e2f0c3c063457d9f3f79c (patch)
tree5e42d9ea94780b63007edd18e15ec56791b8b719 /fish/guestfish.pod
parent3003df6bbc889c3939e6c478462dc4478d5b89f7 (diff)
downloadlibguestfs-54837f6d7ba83178625e2f0c3c063457d9f3f79c.tar.gz
libguestfs-54837f6d7ba83178625e2f0c3c063457d9f3f79c.tar.xz
libguestfs-54837f6d7ba83178625e2f0c3c063457d9f3f79c.zip
fish: Implement progress bars in guestfish.
The progress bar is updated 3 times per second, and is not displayed at all for operations which take less than two seconds. You can disable progress bars by using the flag --no-progress-bars, and you can enable progress bars in non-interactive sessions with the flag --progress-bars. A good way to test this is to use the following command: guestfish --progress-bars \ -N disk:10G \ zero-device /dev/sda (adjust "10G" to get different lengths of time).
Diffstat (limited to 'fish/guestfish.pod')
-rw-r--r--fish/guestfish.pod36
1 files changed, 36 insertions, 0 deletions
diff --git a/fish/guestfish.pod b/fish/guestfish.pod
index cf1140a5..3b9aa203 100644
--- a/fish/guestfish.pod
+++ b/fish/guestfish.pod
@@ -232,6 +232,17 @@ alternative to the I<-a> option: whereas I<-a> adds an existing disk,
I<-N> creates a preformatted disk with a filesystem and adds it.
See L</PREPARED DISK IMAGES> below.
+=item B<--progress-bars>
+
+Enable progress bars, even when guestfish is used non-interactively.
+
+Progress bars are enabled by default when guestfish is used as an
+interactive shell.
+
+=item B<--no-progress-bars>
+
+Disable progress bars.
+
=item B<--remote[=pid]>
Send remote commands to C<$GUESTFISH_PID> or C<pid>. See section
@@ -729,6 +740,31 @@ Create a blank 200MB disk:
guestfish -N disk:200M
+=head1 PROGRESS BARS
+
+Some (not all) long-running commands send progress notification
+messages as they are running. Guestfish turns these messages into
+progress bars.
+
+When a command that supports progress bars takes longer than two
+seconds to run, and if progress bars are enabled, then you will see
+one appearing below the command:
+
+ ><fs> copy-size /large-file /another-file 2048M
+ / 10% [#####-----------------------------------------] 00:30
+
+The spinner on the left hand side moves round once for every progress
+notification received from the backend. This is a (reasonably) golden
+assurance that the command is "doing something" even if the progress
+bar is not moving, because the command is able to send the progress
+notifications. When the bar reaches 100% and the command finishes,
+the spinner disappears.
+
+Progress bars are enabled by default when guestfish is used
+interactively. You can enable them even for non-interactive modes
+using I<--progress-bars>, and you can disable them completely using
+I<--no-progress-bars>.
+
=head1 GUESTFISH COMMANDS
The commands in this section are guestfish convenience commands, in