On 03/30/2015 07:25 AM, Gris Ge wrote:
> On Fri, Mar 27, 2015 at 05:12:11PM -0500, Tony Asleson wrote:
>> Signed-off-by: Tony Asleson <tasle...@redhat.com>
>> ---
>>  doc/lsmcli.bash |  123 
>> +++++++++++++++++++++++++++++++++++++++++++++++++++++++
>> +    # Check if we have a previous
>> +    case "${prev}" in
>> +        '--sys')
>> +            # Is there a better way todo this?
>> +            local items=`lsmcli list --type systems -t${sep} | awk -F '#' 
>> '{print $1}'`
>> +            COMPREPLY=( $(compgen -W "${items}" -- ${cur}) )
>> +            return 0
>> +            ;;
>> +        '--pool')
>> +            # Is there a better way todo this?
>> +            local items=`lsmcli list --type pools -t${sep} | awk -F '#' 
>> '{print $1}'`
>> +            COMPREPLY=( $(compgen -W "${items}" -- ${cur}) )
>> +            return 0
>> +            ;;
>> +        '--vol')
>> +            # Is there a better way todo this?
>> +            local items=`lsmcli list --type volumes -t${sep} | awk -F '#' 
>> '{print $1}'`
>> +            COMPREPLY=( $(compgen -W "${items}" -- ${cur}) )
>> +            return 0
>> +            ;;
> Hi Tony,
> 
> By searching existing volume IDs for auto completion, the command
> line might hang 10 seconds or even more than 1 minutes on some plugin(
> like SMI-S), this might be a bad user experience(the lsmcli command
> will hang and only accept control-C).
> 
> I would suggest only auto completion command name and argument name.
> For argument values, we could define an environment variable like
> LSMCLI_AUTO_COMPLETE_VALUE=0 to disable it by default.
> User who understand the latency reason could enable it.
> For sim or simc, we could enable it by default.

Yeah, I thought about this.  I will add a conditional to enable/disable
these value look ups and maybe a second one too, for enable/disable for
volume specific.

Thanks,
Tony


------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Libstoragemgmt-devel mailing list
Libstoragemgmt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libstoragemgmt-devel

Reply via email to