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 15:41:57 +0000
commit2d6ec07d2cf20c20e9b9269334ba9599d588c410 (patch)
tree9a2498fb4dde69e42828d4c6d4111c5d4968b445
parent59d442e5464076157db2657330f88d605bb742f5 (diff)
downloadbuildstream-2d6ec07d2cf20c20e9b9269334ba9599d588c410.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 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):