git:glog:TODO: Better file arguments handling

This commit is contained in:
2023-02-27 13:57:54 +01:00
parent 3fac79115f
commit 44e83ee8d6

View File

@@ -58,6 +58,10 @@ EOT
fzf_preview[patch]="$fzf_preview[construct] { $REPLY"
# Get file arguments after (and including) `--` and wrap each in double quotes
# TODO: Display `...` behind patch-stat if the patch touched more files
# TODO: Use `-O <file>` for 'patch' command with `-- <file>` argument, so that
# the passed file is ontop although the full patch is shown
# TODO: Support -L flag as well (add `-s` for list and `-- <file>` & maybe `-W`
# for preview)
fzf_preview[files_only]="$fzf_preview[patch] ${(@)${@:${@[(ei)--]}}/(#m)*/\"$MATCH\"}"
if (( $+commands[diff-so-fancy] )); then