clean path in patterns in colors/icons

Related #505
This commit is contained in:
Gokcehan committed 2020-12-24 03:30:11 +03:00
1 parent e4e11e5507
commit 9255408000
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -139,7 +139,7 @@ func parseStylesGNU(env string) styleMap {
log.Printf("invalid $LS_COLORS entry: %s", entry)
return styles
}
key, val := replaceTilde(pair[0]), pair[1]
key, val := filepath.Clean(replaceTilde(pair[0])), pair[1]
styles[key] = applyAnsiCodes(val, tcell.StyleDefault)
}
+1 -1
View File
@@ -38,7 +38,7 @@ func parseIconsEnv(env string) iconMap {
log.Printf("invalid $LF_ICONS entry: %s", entry)
return icons
}
key, val := replaceTilde(pair[0]), pair[1]
key, val := filepath.Clean(replaceTilde(pair[0])), pair[1]
icons[key] = val
}