Ability to customize filename truncating (#417)

* Add truncatechar option

* Add ability to set truncatechar via `set` command

* Add completion for truncatechar option

* Actually use truncatechar option when truncating

* Add truncatechar option to docs
This commit is contained in:
Alexey Yerin authored and GitHub committed 2020-07-18 03:08:25 +03:00
1 parent 9880104c12
commit d0cd181eb6
6 files changed
+9 -2

No files matched your search

+2
View File
@@ -55,6 +55,7 @@ var gOpts struct {
promptfmt string
shell string
timefmt string
truncatechar string
ratios []int
hiddenfiles []string
info []string
@@ -93,6 +94,7 @@ func init() {
gOpts.promptfmt = "\033[32;1m%u@%h\033[0m:\033[34;1m%w/\033[0m\033[1m%f\033[0m"
gOpts.shell = gDefaultShell
gOpts.timefmt = time.ANSIC
gOpts.truncatechar = "~"
gOpts.ratios = []int{1, 2, 3}
gOpts.hiddenfiles = []string{".*"}
gOpts.info = nil