File tree Expand file tree Collapse file tree 3 files changed +9
-7
lines changed
Expand file tree Collapse file tree 3 files changed +9
-7
lines changed Original file line number Diff line number Diff line change 7777
7878────────────────────────────────────────────────────────────────────────────────
7979[ q/ctrl+c: quit] [ h: help ] ● Default Workspace ->
80- /TMPDIR/default [80D[2K[?2004l[?25h[?1002l[?1003l[?1006l
80+ /TMPDIR/default[80D[2K[?2004l[?25h[?1002l[?1003l[?1006l
Original file line number Diff line number Diff line change 2323 ▌ [38;5;2m[0m[38;2;211;198;170m[0m [38;2;211;198;170m│ [0m[38;5;2mecho[0m [38;5;61m'hello from nameless'[0m
2424 ▌
2525 ▌ [38;2;211;198;170;3m[0m [38;2;211;198;170;3mExecutable can be found in[0m[38;2;211;198;170m[0m
26- ▌ [0m[38;2;214;153;182m[0m [38;2;214;153;182m/TMPDIR/root.flow[0m[38;2;211;198;170m [ 🔗[0m
27- ▌ [0m[38;2;214;153;182;4m[0m [38;2;214;153;182;4m/TMPDIR/root.flow[0m[38;2;211;198;170m ][0m
26+ ▌ [0m[38;2;214;153;182m[0m [38;2;214;153;182m/TMPDIR/root.flow[0m[38;2;211;198;170m [ 🔗[0m
27+ ▌ [0m[38;2;214;153;182;4m[0m [38;2;214;153;182;4m/TMPDIR/root.flow[0m[38;2;211;198;170m ][0m
2828 ▌
2929 ▌
3030 ▌
8585 ▌
8686 ▌
8787────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
88- [ q/ctrl+c: quit] [ h: help ] ● Default Workspace -> /TMPDIR/default [200D[2K[?2004l[?25h[?1002l[?1003l[?1006l
88+ [ q/ctrl+c: quit] [ h: help ] ● Default Workspace -> /TMPDIR/default[200D[2K[?2004l[?25h[?1002l[?1003l[?1006l
Original file line number Diff line number Diff line change @@ -36,16 +36,18 @@ func NormalizeTmpDirs(input string) string {
3636 tmpDir += "/"
3737 }
3838 tmpDirPattern := regexp .QuoteMeta (tmpDir )
39- // Match temp dir followed by any path
40- re := regexp .MustCompile (tmpDirPattern + `[^\s\x00-\x1F]*` )
39+ // Match temp dir followed by any path plus any trailing whitespace
40+ re := regexp .MustCompile (tmpDirPattern + `[^\s\x00-\x1F]+\s *` )
4141 result := re .ReplaceAllStringFunc (input , func (m string ) string {
4242 pathAfterTmp := m [len (tmpDir ):]
43+ // Trim whitespace from the captured path
44+ pathAfterTmp = strings .TrimSpace (pathAfterTmp )
4345 parts := strings .Split (pathAfterTmp , "/" )
4446 if len (parts ) >= 2 {
4547 // Keep only the last meaningful part
4648 return "/TMPDIR/" + parts [len (parts )- 1 ]
4749 }
48- return "/TMPDIR/" + pathAfterTmp
50+ return "/TMPDIR/" + pathAfterTmp + " "
4951 })
5052
5153 return result
You can’t perform that action at this time.
0 commit comments