common prefix should not apply to basename
This commit is contained in:
parent
8795bf8cf9
commit
92f428b6d1
1 changed files with 1 additions and 0 deletions
|
|
@ -254,6 +254,7 @@ def fmt_desc(word: str, desc: str, max_word_len: int) -> Iterator[str]:
|
|||
if len(allm) > 1:
|
||||
common_prefix = os.path.commonprefix(allm)
|
||||
if common_prefix and '/' in common_prefix:
|
||||
common_prefix = os.path.dirname(common_prefix) + '/'
|
||||
cmd.extend(('-p', shlex.quote(common_prefix)))
|
||||
matches = MatchGroup({k[len(common_prefix):]: v for k, v in matches.items()})
|
||||
has_descriptions = any(matches.values())
|
||||
|
|
|
|||
Loading…
Reference in a new issue