cli: add support for partial completion with separator character
Useful for completing long lists of possible values with common prefix Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
@@ -311,7 +311,10 @@ function completion(count) {
|
||||
add = " ";
|
||||
cat = "";
|
||||
|
||||
add += sprintf("%-"+len+"s", entry.name);
|
||||
let name = entry.name;
|
||||
if (entry.incomplete)
|
||||
name += "...";
|
||||
add += sprintf("%-"+len+"s", name);
|
||||
str += add;
|
||||
x += length(add);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user