소스 검색

Do not print newline for prompt if not in a git repo

DricomDragon 5 년 전
부모
커밋
3fb5f75637
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      Install/Templates/fish/functions/fish_prompt.fish

+ 3 - 1
Install/Templates/fish/functions/fish_prompt.fish

@@ -22,7 +22,9 @@ function fish_prompt --description 'Write out the prompt'
 
 	# Newline on tiny screens
 	if test $COLUMNS -lt 50
-		echo
+		if git rev-parse --is-inside-work-tree &> /dev/null
+			echo
+		end
 	end
 
     __terlar_git_prompt