Rename and add comment
Rename onelineformat to formatshort to keep one continuous format (dateshort).
This commit is contained in:
@@ -325,8 +325,9 @@ function urldec() {
|
|||||||
glog() {
|
glog() {
|
||||||
# One line format for fzf list view
|
# One line format for fzf list view
|
||||||
# abbreviated commit hash (yellow), title and ref names
|
# 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
|
# Verbose format for the preview window on the right
|
||||||
|
# This array is stitched together with newlines later
|
||||||
local format=(
|
local format=(
|
||||||
'--pretty=format:%C(yellow)' # newline created by this eaten by %-
|
'--pretty=format:%C(yellow)' # newline created by this eaten by %-
|
||||||
'%-commit: %H%C(auto)' # yellow commit hash
|
'%-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
|
# (we are not on a line that contains only graph elements), execute git-show
|
||||||
# on the commit hash.
|
# on the commit hash.
|
||||||
commit="$(\
|
commit="$(\
|
||||||
git log "$onelineformat" --graph "$dateshort" "$colors" \
|
git log "$formatshort" --graph "$dateshort" "$colors" \
|
||||||
| fzf --ansi --reverse --bind "${(j:,:)binds}" --preview="
|
| fzf --ansi --reverse --bind "${(j:,:)binds}" --preview="
|
||||||
out=\"\$(echo {} | sed -Ee \"$del_ansi\" -e \"$commit_hash\")\"
|
out=\"\$(echo {} | sed -Ee \"$del_ansi\" -e \"$commit_hash\")\"
|
||||||
if [ \"\$out\" ]; then
|
if [ \"\$out\" ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user