summaryrefslogtreecommitdiffstats
path: root/eoptasks.py
diff options
context:
space:
mode:
Diffstat (limited to 'eoptasks.py')
-rwxr-xr-xeoptasks.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/eoptasks.py b/eoptasks.py
index ee4562c..c2d4607 100755
--- a/eoptasks.py
+++ b/eoptasks.py
@@ -124,12 +124,15 @@ def parse_args():
def filter_servers(servers, args):
selected_servers = []
if args.keywords:
- for keyword in args.keywords.split(','):
+ config = get_config()
+ cmd_keywords = config['keywords'].get(args.keywords, args.keywords)
+
+ for keyword in cmd_keywords.split(','):
keywords = set(keyword.split('/'))
selected_servers.extend(
[x for x in servers if keywords.issubset(x.keywords) and not x in selected_servers]
)
- for keyword in args.keywords.split(','):
+ for keyword in cmd_keywords.split(','):
if keyword.startswith('!') or keyword.startswith('-'):
selected_servers = [x for x in selected_servers if keyword[1:] not in x.keywords]
else: