From 292b45aefbb202950c9059eb48e47d700d0c9df4 Mon Sep 17 00:00:00 2001 From: druckdev <63563978+druckdev@users.noreply.github.com> Date: Mon, 31 Aug 2020 02:29:29 +0200 Subject: [PATCH] Rename and add comment Rename onelineformat to formatshort to keep one continuous format (dateshort). --- .config/zsh/plugins/functionsPost.zsh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.config/zsh/plugins/functionsPost.zsh b/.config/zsh/plugins/functionsPost.zsh index 393458f..12e79ef 100644 --- a/.config/zsh/plugins/functionsPost.zsh +++ b/.config/zsh/plugins/functionsPost.zsh @@ -325,8 +325,9 @@ function urldec() { glog() { # One line format for fzf list view # abbreviated commit hash (yellow), title and ref names - local onelineformat='--pretty=format:%C(yellow)%h %Creset%s%C(auto)%d' + local formatshort='--pretty=format:%C(yellow)%h %Creset%s%C(auto)%d' # Verbose format for the preview window on the right + # This array is stitched together with newlines later local format=( '--pretty=format:%C(yellow)' # newline created by this eaten by %- '%-commit: %H%C(auto)' # yellow commit hash @@ -368,7 +369,7 @@ glog() { # (we are not on a line that contains only graph elements), execute git-show # on the commit hash. commit="$(\ - git log "$onelineformat" --graph "$dateshort" "$colors" \ + git log "$formatshort" --graph "$dateshort" "$colors" \ | fzf --ansi --reverse --bind "${(j:,:)binds}" --preview=" out=\"\$(echo {} | sed -Ee \"$del_ansi\" -e \"$commit_hash\")\" if [ \"\$out\" ]; then