Re: [libvirt] Remove OPTION section in output of 'virsh help command' if no option exists.

2013-05-22 Thread Zhang Xiaohe
于 2013年05月23日 06:19, Eric Blake 写道: On 05/21/2013 09:15 PM, Zhang Xiaohe wrote: Don't print 'OPTION' if there's no options. Just behaves as DESCRIPTION does. This mostly affects 'interface' command group. Signed-off-by: Zhang Xiaohezhan...@cn.fujitsu.com Reported-by: Li Yangliyang.f

[libvirt] Remove OPTION section in output of 'virsh help command' if no option exists.

2013-05-21 Thread Zhang Xiaohe
Don't print 'OPTION' if there's no options. Just behaves as DESCRIPTION does. This mostly affects 'interface' command group. Signed-off-by: Zhang Xiaohe zhan...@cn.fujitsu.com Reported-by: Li Yang liyang.f...@cn.fujitsu.com --- tools/virsh.c |4 +++- 1 files changed, 3 insertions(+), 1

[libvirt] [question] Why doesn't virsh command support an optional parameter

2013-04-25 Thread Zhang Xiaohe
, will it? So, why doesn't virsh support this and what do you think of adding this feature? Thanks Zhang Xiaohe -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

Re: [libvirt] [question] Why doesn't virsh command support an optional parameter

2013-04-25 Thread Zhang Xiaohe
于 2013年04月26日 11:35, Eric Blake 写道: On 04/25/2013 09:19 PM, Zhang Xiaohe wrote: hi guys, It's hard for me to understand why doesn't virsh command support an optional parameter because I think omitting a parameter and offering a default value sometimes is quite convenient. For example: $ virsh

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

2013-03-21 Thread Zhang Xiaohe
This patch makes '~' and '$HOME' can be recognized by virsh in interactive mode. These two variables are replaced with real path. eg: virsh # pwd /home/libvirt virsh # cd ~/rpmbuild virsh # pwd /root/rpmbuild see https://bugzilla.redhat.com/show_bug.cgi?id=806793 Signed-off-by: Zhang Xiaohe

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

2013-03-21 Thread Zhang Xiaohe
于 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

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

2013-03-21 Thread Zhang Xiaohe
于 2013年03月22日 10:17, Eric Blake 写道: On 03/21/2013 07:33 PM, Zhang Xiaohe wrote: 于 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

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

2013-03-21 Thread Zhang Xiaohe
于 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