From 65a5fea14aa382eb8703cc0e80f6f3a0b347086c Mon Sep 17 00:00:00 2001 From: Francois Regnoult Date: Tue, 27 Nov 2018 12:31:41 +0000 Subject: [PATCH] Offer a config way to overwrite the cwd n_before variable --- powerline_shell/segments/cwd.py | 1 + 1 file changed, 1 insertion(+) diff --git a/powerline_shell/segments/cwd.py b/powerline_shell/segments/cwd.py index a702317..0582199 100644 --- a/powerline_shell/segments/cwd.py +++ b/powerline_shell/segments/cwd.py @@ -73,6 +73,7 @@ def add_cwd_segment(powerline): # max_depth must be greater than n_before or else you end up repeating # parts of the path with the way the splicing is written below. n_before = 2 if max_depth > 2 else max_depth - 1 + n_before = powerline.segment_conf("cwd", "n_before", n_before) names = names[:n_before] + [ELLIPSIS] + names[n_before - max_depth:] if powerline.segment_conf("cwd", "mode") == "dironly":