branch: elpa/telephone-line
commit a8cb3839570557b49f487316f5a59b9aa0e4486b
Author: Mike Panitz <[email protected]>
Commit: Mike Panitz <[email protected]>
2 new segments: show just the file's name & show path AND file name
---
telephone-line-segments.el | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/telephone-line-segments.el b/telephone-line-segments.el
index 4afff11f39..a88a8101c0 100644
--- a/telephone-line-segments.el
+++ b/telephone-line-segments.el
@@ -95,6 +95,17 @@ Adapted from doom-modeline."
(telephone-line-defsegment* telephone-line-buffer-name-segment ()
(telephone-line-raw (buffer-name)))
+;; For a file like /a/b/c/file.txt, this should display
+;; file.txt
+(telephone-line-defsegment telephone-line-buffer-name-segment ()
+ mode-line-buffer-identification
+ )
+
+;; For a file like /a/b/c/file.txt, this should display
+;; /a/b/c/file.txt
+(telephone-line-defsegment telephone-line-file-name-segment ()
+ buffer-file-name)
+
(telephone-line-defsegment* telephone-line-buffer-modified-segment ()
(if (buffer-modified-p)
(telephone-line-raw "!")