Procházet zdrojové kódy

Fix git log display errors without truncation

Git log subject truncation is okay, but at this point still does unnecessary
padding to the specified number of characters. We fix the display errors instead
by modifying the `less` pager options. Apparently `R` ensures more correct
displays than `r`, while still allowing control characters like those for
colourisation to work.
weiyi před 10 roky
rodič
revize
1ebe5e1033
2 změnil soubory, kde provedl 2 přidání a 3 odebrání
  1. 1 1
      zsh/custom/git.zsh
  2. 1 2
      zsh/custom/less.zsh

+ 1 - 1
zsh/custom/git.zsh

@@ -33,7 +33,7 @@ if [[ $POST_1_8_3_GIT -gt 0 ]]; then
 else
   DECO_COLOUR='%Cgreen'
 fi
-GIT_LOG_FORMAT='"format:%C(yellow)%h %Creset%ad %Cblue%an:'$DECO_COLOUR'%d %Creset%<(58,trunc)%s"'
+GIT_LOG_FORMAT='"format:%C(yellow)%h %Creset%ad %Cblue%an:'$DECO_COLOUR'%d %Creset%s"'
 
 alias ga.='git add -A .'
 alias gap='git add -p'

+ 1 - 2
zsh/custom/less.zsh

@@ -4,5 +4,4 @@
 # i = searches ignore case, unless there are upper case characters
 # r = display raw control characters (Ctrl-A is ^A)
 # M = verbose `less` prompt
-# X = no init? Read `man` entry to find out more. Leaving it here.
-export LESS='-irMX'
+export LESS='-iRM'