fish: Allow -<<END as a syntax for uploading "heredocs".
[libguestfs.git] / fish / guestfish.pod
index 999cc3f..836c4f7 100644 (file)
@@ -313,7 +313,9 @@ the Unix L<chmod(1)> program):
  chmod 0777 /public  # OK
  chmod 777 /public   # WRONG! This is mode 777 decimal = 01411 octal.
 
-Commands that return numbers currently always print them in decimal.
+Commands that return numbers usually print them in decimal, but
+some commands print numbers in other radices (eg. C<umask> prints
+the mode in octal, preceeded by C<0>).
 
 =head1 WILDCARDS AND GLOBBING
 
@@ -385,6 +387,7 @@ Other examples:
 
  hexdump /bin/ls | head
  list-devices | tail -1
+ tgz-out / - | tar ztf -
 
 The space before the pipe symbol is required, any space after the pipe
 symbol is optional.  Everything after the pipe symbol is just passed
@@ -483,6 +486,39 @@ user ID of the process, and C<$PID> is the process ID of the server.
 
 Guestfish client and server versions must match exactly.
 
+=head1 UPLOADING AND DOWNLOADING FILES
+
+For commands such as C<upload>, C<download>, C<tar-in>, C<tar-out> and
+others which upload from or download to a local file, you can use the
+special filename C<-> to mean "from stdin" or "to stdout".  For example:
+
+ upload - /foo
+
+reads stdin and creates from that a file C</foo> in the disk image,
+and:
+
+ tar-out /etc - | tar tf -
+
+writes the tarball to stdout and then pipes that into the external
+"tar" command (see L</PIPES>).
+
+When using C<-> to read from stdin, the input is read up to the end of
+stdin.  You can also use a special "heredoc"-like syntax to read up to
+some arbitrary end marker:
+
+ upload -<<END /foo
+ input line 1
+ input line 2
+ input line 3
+ END
+
+Any string of characters can be used instead of C<END>.  The end
+marker must appear on a line of its own, without any preceeding or
+following characters (not even spaces).
+
+Note that the C<-E<lt>E<lt>> syntax only applies to parameters used to
+upload local files (so-called "FileIn" parameters in the generator).
+
 =head1 GUESTFISH COMMANDS
 
 The commands in this section are guestfish convenience commands, in
@@ -748,6 +784,7 @@ L<virt-list-partitions(1)>,
 L<virt-ls(1)>,
 L<virt-make-fs(1)>,
 L<virt-rescue(1)>,
+L<virt-resize(1)>,
 L<virt-tar(1)>,
 L<virt-win-reg(1)>.