How to deal with PROMPT_COMMAND formatting getting yanked up? #887
Unanswered
martin-braun
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I'm on MacOS. My
zshterminal always looked like this:Yep, my home directory is a git repo, don't be confused about
[master]please. :)I achieved this by using this
.zshrccode:I used
tmuxinatorquite a while withzshand I often initiated panes just with- clearor- echo ''to have empty ones spawned. The prompt above always looked right in those panels.Now I switched my default shell to
/bin/bash. To achieve the same prompt, I use this.bashrccode:It looks the same, but resizing any terminal doesn't play well with it, and this causes problems with
tmuxinatoras well. Panes do initiate, but the prompt gets messed up:I think this has to be the result by the fact, that
tmuxinatorruns the initial code before adding the next pane, thus it will resize whatever is in the pane after the command has run. The prompt gets fixed if I hit enter in the pane once, because it will re-evaluate mypromptfunction.The problem in action:
No combination of
shopt -s checkwinsizeandtrap 'prompt' WINCHsolve this issue. I think it would be nice iftmuxinatorcould first create all the panes and then run the initial commands, so that a simple- clearwill make those prompts nice to look at.All reactions