diff options
author | Richard Jones <rjones@trick.home.annexia.org> | 2009-07-15 11:39:04 +0100 |
---|---|---|
committer | Richard Jones <rjones@trick.home.annexia.org> | 2009-07-15 11:39:04 +0100 |
commit | 9449b0fce4145a56df9d43169d61e8b2c4e41b09 (patch) | |
tree | 02b52334c5712ab9ef98414807db03dc71ea3320 /guestfish.pod | |
parent | 1d29b4e40bed1145e2ca359bda62d5aa218dbc41 (diff) | |
download | libguestfs-9449b0fce4145a56df9d43169d61e8b2c4e41b09.tar.gz libguestfs-9449b0fce4145a56df9d43169d61e8b2c4e41b09.tar.xz libguestfs-9449b0fce4145a56df9d43169d61e8b2c4e41b09.zip |
guestfish: Add tilde expansion for paths (RHBZ#511372).
This commit adds tilde expansion for local users in guestfish:
><fs> echo "~"
~
><fs> echo ~
/home/rjones
><fs> echo ~foo
~foo
><fs> echo ~rjones/bar
/home/rjones/bar
><fs> echo ~roo
~roo
><fs> echo ~root/foo
/root/foo
><fs> echo ~root
/root
Diffstat (limited to 'guestfish.pod')
-rw-r--r-- | guestfish.pod | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/guestfish.pod b/guestfish.pod index 4f8cf95d..32a30901 100644 --- a/guestfish.pod +++ b/guestfish.pod @@ -328,6 +328,20 @@ to quote it, eg: echo "|" +=head1 HOME DIRECTORIES + +If a parameter starts with the character C<~> then the tilde may be +expanded as a home directory path (either C<~> for the current user's +home directory, or C<~user> for another user). + +Note that home directory expansion happens for users known I<on the +host>, not in the guest filesystem. + +To use a literal argument which begins with a tilde, you have to quote +it, eg: + + echo "~" + =head1 EXIT ON ERROR BEHAVIOUR By default, guestfish will ignore any errors when in interactive mode |