当使用标签时,终端在High Sierra上留下一个空行


7

自从El Capitain升级到High Sierra(我跳过Sierra)后,我的终端在打开另一个标签时在最底部留下一个空行。见图为例:

Mac终端

这是我的〜/ .bash_profile

# Beautify bash prompt
function parse_git_branch {
  git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/on \1/'
}
export PS1="\e[1;30m\u\e[m in \e[0;34m\w\e[m \e[0;32m\$(parse_git_branch)\e[m \e[0;37m// \$(date '+%H:%M')\e[m\n$ "

# Extend PATH for Homebrew
export PATH="/usr/local/sbin:$PATH"
export PATH="$(brew --prefix homebrew/php/php70)/bin:$PATH"

# Alias definitions.
# You may want to put all your additions into a separate file like
# ~/.bash_aliases, instead of adding them here directly.
# See /usr/share/doc/bash-doc/examples in the bash-doc package.

if [ -f ~/.bash_aliases ]; then
    . ~/.bash_aliases
fi

这不是一个大问题,但有点烦人,尤其是在ssh会话期间使用tmux时。

有谁知道是什么导致了这个或我如何解决它?

Answers:


1

我能够解决这个问题,至少是暂时的,通过Shell打开Inspector - > Show Inspector,转到info选项卡,然后将“columns”减少1.然后我将窗口拖回到所需的大小,似乎现在看起来很合适。我必须为每个标签执行此操作。似乎每次我重新启动终端时都需要再次完成,这非常令人讨厌,但幸运的是我并没有经常关闭它。它似乎工作,至少作为一个kludgy解决方案。祝好运。


非常感谢!这实际上有效。我会接受这个答案,直到更好的东西出现。
lhermann

很酷,很高兴它有效。它似乎坚持通过重新启动补丁,所以只要你不手动退出终端,你可以避免再次这样做。
shortspecialbus

3

此问题已在macOS Mojave 10.14中得到纠正。


一些有用的建议:用引用来补充你的答案总是好的; 无论是外部采购还是您可以通过自己的经验“验证”修复的一些信息。+1让你有一个良好的开端。
Allan

感谢您的建议!这只是我自己的经历。
pyrmont

2

绝对不是理想的解决方案,但尝试添加

osascript -e 'tell app "Terminal" to set number of rows of window 1 to 100'

到你的~/.bash_profile。每次打开新选项卡时都会运行AppleScript。(这可能不适合你。我对tmux的工作方式不太了解)

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.