~fmac/corylus

e83d345cf7540c90f3bee891ea2e4171d9abfbee — Francesco Camuffo 3 months ago de4f1e6
Show two chars in CWD if first is '.'
1 files changed, 7 insertions(+), 3 deletions(-)

M misc.go
M misc.go => misc.go +7 -3
@@ 27,10 27,14 @@ func segCwd() (string, error) {
		if i == len(ss) - 1 {
			wd += s
		} else {
			if len(s) != 0 {
				wd += string(s[0]) + "/"
			} else {
			if len(s) == 0 {
				wd += "/"
				continue
			}
			if s[0] == '.' {
				wd += s[:2] + "/"
			} else {
				wd += string(s[0]) + "/"
			}
		}
	}