浏览代码

Display git status on new line on tiny terminals

The limit of the number of columns is 50.
DricomDragon 5 年之前
父节点
当前提交
f0cec2af8e
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      Install/Templates/fish/functions/fish_prompt.fish

+ 5 - 0
Install/Templates/fish/functions/fish_prompt.fish

@@ -20,6 +20,11 @@ function fish_prompt --description 'Write out the prompt'
     echo -n (prompt_pwd)
     set_color normal
 
+	# Newline on tiny screens
+	if test $COLUMNS -lt 50
+		echo
+	end
+
     __terlar_git_prompt
     __fish_hg_prompt
     echo