From 2d6ec07d2cf20c20e9b9269334ba9599d588c410 Mon Sep 17 00:00:00 2001 From: Phillip Smyth Date: Fri, 23 Nov 2018 12:31:20 +0000 Subject: cli.py: no autocomplete on files without .bst --- buildstream/_frontend/cli.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/buildstream/_frontend/cli.py b/buildstream/_frontend/cli.py index c7d4c1eed..b845d00eb 100644 --- a/buildstream/_frontend/cli.py +++ b/buildstream/_frontend/cli.py @@ -109,7 +109,11 @@ def complete_target(args, incomplete): if element_directory: base_directory = os.path.join(base_directory, element_directory) - return complete_path("File", incomplete, base_directory=base_directory) + complete_list = [] + for p in complete_path("File", incomplete, base_directory=base_directory): + if p.endswith(".bst ") or p.endswith("/"): + complete_list.append(p) + return complete_list def override_completions(cmd, cmd_param, args, incomplete): -- cgit v1.2.1