Преглед на файлове

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