diff options
| -rw-r--r-- | internal/prompt/main.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/internal/prompt/main.go b/internal/prompt/main.go index be5bb59..f403f6c 100644 --- a/internal/prompt/main.go +++ b/internal/prompt/main.go @@ -47,6 +47,10 @@ func Exec(args []string) int { fields = appendUnlessEmpty(fields, getExitCodeField(args[0])) } + //print terminal title first, otherwise it confuses zsh's line length + //computation and makes it misplace UI elements + tt.PrintTo(os.Stdout) + line := strings.Join(fields, " ") lineWidth := getPrintableLength(line) @@ -79,8 +83,6 @@ func Exec(args []string) int { } os.Stdout.Write([]byte(shellIdent + "$ ")) - tt.PrintTo(os.Stdout) - return 0 } |
