Hide the file extension? #2007
Unanswered
MarcCoquand
asked this question in
Q&A
Replies: 1 comment
-
Such a feature doesn't exist. It shouldn't be too difficult to implement, something like below: diff --git a/ui.go b/ui.go
index 60c77ff..66e7a1d 100644
--- a/ui.go
+++ b/ui.go
@@ -481,6 +481,9 @@ func (win *win) printDir(ui *ui, dir *dir, context *dirContext, dirStyle *dirSty
}
filename := []rune(f.Name())
+ if gOpts.hidefileext {
+ filename = []rune(strings.TrimSuffix(f.Name(), f.ext))
+ }
if runeSliceWidth(filename) > maxFilenameWidth {
truncatePos := (maxFilenameWidth - 1) * gOpts.truncatepct / 100
lastPart := runeSliceWidthLastRange(filename, maxFilenameWidth-truncatePos-1)
I'm just not really convinced that it's a feature worth adding. It might be useful for non-technical users that don't want/need to deal with file extensions, but then |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hiya!
I'm curious if there is some way within lf to hide the file extension (.md, .org e.t.c.)?
Beta Was this translation helpful? Give feedback.
All reactions