summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhillip Smyth <phillip.smyth@codethink.co.uk>2018-11-23 12:31:20 +0000
committerPhillip Smyth <phillip.smyth@codethink.co.uk>2018-11-30 12:12:11 +0000
commit367700c7aa65d182dcd8ef8d6231527a115fde8a (patch)
tree49568d0a5c2a1356126c08755a4b1e88a9838fa8
parentc89dabf1a195dcb3eb48d102f9791694d9cd05fb (diff)
downloadbuildstream-367700c7aa65d182dcd8ef8d6231527a115fde8a.tar.gz
cli.py: no autocomplete on files without .bst
-rw-r--r--buildstream/_frontend/cli.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/buildstream/_frontend/cli.py b/buildstream/_frontend/cli.py
index b1b4e03b0..236db9761 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):