Re: [PATCH] Make virsh support '~' and '$HOME' in interactive mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



于 2013年03月21日 21:08, Eric Blake 写道:
On 03/21/2013 04:20 AM, Daniel P. Berrange wrote:

In other words, if we're going to do this, go all the way and use
wordexp() to get shell-like expansion, instead of reinventing it
ourselves.  Except that wordexp() is not portable to mingw, and not
provided in gnulib.


Also, we'll need a way to escape the special meaning of '~'
and '$' to get them treated as literal characters instead of
special characters.

We already have the ability to quote characters, so that we can embed
spaces; our quoting rules are (intentionally) copied on shell rules, so
they would still work with a wordexp() approach.

This seems better than just expanding $HOME, i will try this wordexp().
One question, is variable can be accepted in the position of command
and option? That is, is this form
virsh # $VAR --$OPT=~/rpmbuild
could be valid?


--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]