1. Christopher Nilsson
  2. fish_scripts

Commits

Christopher Nilsson  committed 7343d1b

added git-highscores function

  • Participants
  • Parent commits 44dc88f
  • Branches default

Comments (0)

Files changed (2)

File fish_prompt.fish

View file
  • Ignore whitespace
 
 	# Just calculate these once, to save a few cycles when displaying the prompt
 	if not set -q __fish_prompt_hostname
-		set -g __fish_prompt_hostname (hostname|cut -d . -f 1)
+		set -l hn (hostname)
+		if [ "$hn" != "chris.tld" ]
+			set -g __fish_prompt_hostname (hostname|cut -d . -f 1)
+		else
+			set -g __fish_prompt_hostname $hn
+		end
 	end
 
 	if not set -q __fish_prompt_normal

File git-highscores.fish

View file
  • Ignore whitespace
+function git-highscores --description 'Scan the git log for top committers...'
+	git log --raw | grep "^Author: " | sort | uniq -c
+
+end