glog: Display key bindings in sticky header
This commit is contained in:
@@ -104,6 +104,7 @@ local -A binds=(
|
|||||||
"ctrl-p" "change-preview($fzf_preview[patch])"
|
"ctrl-p" "change-preview($fzf_preview[patch])"
|
||||||
# Files only
|
# Files only
|
||||||
"ctrl-f" "change-preview($fzf_preview[files_only])"
|
"ctrl-f" "change-preview($fzf_preview[files_only])"
|
||||||
|
# For ctrl-space see below
|
||||||
)
|
)
|
||||||
|
|
||||||
# TODO: Make the --preview argument dependent of --stat flag (i.e.
|
# TODO: Make the --preview argument dependent of --stat flag (i.e.
|
||||||
@@ -115,6 +116,10 @@ local -a fzf_args=(
|
|||||||
"--ansi"
|
"--ansi"
|
||||||
# Expand the binds array in the format "key1:value1,key2:value2".
|
# Expand the binds array in the format "key1:value1,key2:value2".
|
||||||
"--bind" "${(@kj:,:)binds/(#m)*/$MATCH:$binds[$MATCH]}"
|
"--bind" "${(@kj:,:)binds/(#m)*/$MATCH:$binds[$MATCH]}"
|
||||||
|
# Display key-bindings in a sticky header
|
||||||
|
"--header" "enter: fullscreen, ctrl-y: copy, ctrl-space: move preview, ctrl-[spf]: preview stats/full/files"
|
||||||
|
# Keep header above prompt line
|
||||||
|
"--header-first"
|
||||||
# Execute git show on the commit as preview.
|
# Execute git show on the commit as preview.
|
||||||
"--preview" "$fzf_preview[files_only]"
|
"--preview" "$fzf_preview[files_only]"
|
||||||
# Reverse the layout so that the newest commit is at the top.
|
# Reverse the layout so that the newest commit is at the top.
|
||||||
|
|||||||
Reference in New Issue
Block a user