98bc781 vshReadlineOptionsGenerator: Don't add already specified options to the list

Authored and Committed by mprivozn 6 years ago
1 file changed. 19 lines added. 61 lines removed.
    vshReadlineOptionsGenerator: Don't add already specified options to the list
    
    The current state of art is as follows:
    
     1) vshReadlineOptionsGenerator() generate all possible --options
     for given command, and then
     2) vshReadlineOptionsPrune() clears out already provided ones
     from the list.
    
    Not only this brings needless memory complexity it is also not
    trivial to get right. We can switch to easier approach: just
    don't add already specified --options in the first step.
    
    Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
    Reviewed-by: Erik Skultety <eskultet@redhat.com>
    
        
file modified
+19 -61