mirror of
				https://github.com/apache/cloudstack.git
				synced 2025-11-04 00:02:37 +01:00 
			
		
		
		
	cli: don't search rule in apis, filter apis that start with that rule
Search verb in apis takes more time than filtering out apis that start with that verb from the grammar. Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
This commit is contained in:
		
							parent
							
								
									46ad8d6f4e
								
							
						
					
					
						commit
						49b4786de6
					
				@ -295,7 +295,7 @@ def main():
 | 
			
		||||
    self = CloudStackShell
 | 
			
		||||
    for rule in grammar:
 | 
			
		||||
        setattr(self, 'completions_' + rule, map(lambda x: x.replace(rule, ''),
 | 
			
		||||
                                                 filter(lambda x: rule in x,
 | 
			
		||||
                                                 filter(lambda x: x.startswith(rule),
 | 
			
		||||
                                                        completions)))
 | 
			
		||||
 | 
			
		||||
        def add_grammar(rule):
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user