diff --git a/libexec/render.py b/libexec/render.py index 1f4a318..170e978 100755 --- a/libexec/render.py +++ b/libexec/render.py @@ -58,6 +58,9 @@ def style_color(fg): def style_bold(): return "\033[1m" +def style_invert(): + return "\033[7m" + def style_reset(): return "\033[0m" @@ -234,6 +237,7 @@ class Dir: self.path = path self.slash = slash self.truncated = False + self.void = False self.name = os.path.basename(path) if name is None else name if os.access(path, os.W_OK): @@ -242,6 +246,10 @@ class Dir: self.color = COLOR_DIR_RO else: self.color = COLOR_DIR_NO + + if os.path.islink(path) and os.path.realpath(path).startswith("/dev/shm/void"): + self.name = "«" + self.name + "»" + self.void = True def __len__(self): return len(self.name) + len(self.slash) @@ -258,6 +266,9 @@ class Dir: if self.truncated: output.append(style_bold()) + if self.void: + output.append(style_invert()) + output.append(style_color(self.color)) output.append(self.name)