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

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

 



于 2013年03月22日 11:43, Eric Blake 写道:

Expanding everything means re-implementing what the shell does.
wordexp() would be ideal for this, except that wordexp() is not portable
enough.  By the time we end up rewriting enough code to do what
wordexp() already could do, we are adding lots of bloat into virsh to
make it mimic what /bin/sh can already do.

Ergo, I think that this patch idea is not worth it.  If a user wants
shell expansions, they should let the shell do it, when building up the
virsh command line.  That is, instead of trying to do expansions in a
virsh interactive session:

$ virsh
virsh# echo $HOME

you should just let the shell do it beforehand:

$ virsh "echo $HOME"

Thanks for explanation, I get it.


--
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]