提交 55a937cb 编写于 作者: R Rudá Moura

Merge pull request #621 from ldoktor/mux-fixes2

Couple of multiplexer related improvements [v2]
......@@ -93,8 +93,8 @@ class Multiplexer(plugin.Plugin):
cend = output.term_support.ENDC
paths = ', '.join(["%s%s@%s%s" % (_.name, color, _.yaml, cend)
for _ in tpl])
view.notify(event='minor', msg='\nVariant %s: %s' %
(index + 1, paths))
view.notify(event='minor', msg='%sVariant %s: %s' %
(('\n' if args.contents else ''), index + 1, paths))
if args.contents:
env = {}
for node in tpl:
......
......@@ -512,8 +512,6 @@ def path_parent(path):
:return: the parent path as string.
"""
parent = path.rpartition('/')[0]
if parent == '':
return ''
return parent
......@@ -533,8 +531,12 @@ def apply_filters(tree, filter_only=None, filter_out=None):
"""
if filter_only is None:
filter_only = []
else:
filter_only = [_.rstrip('/') for _ in filter_only if _]
if filter_out is None:
filter_out = []
else:
filter_out = [_.rstrip('/') for _ in filter_out if _]
for node in tree.iter_children_preorder():
keep_node = True
for path in filter_only:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册