Apply suggestions from code review

Co-authored-by: sandr01d <88739791+sandr01d@users.noreply.github.com>
This commit is contained in:
Wenxuan 2023-06-15 09:49:07 +08:00 committed by GitHub
parent a0afcefeb6
commit 9014a973e7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -138,7 +138,7 @@ _forgit_diff() {
$FORGIT_FZF_DEFAULT_OPTS
+m -0 --bind=\"enter:execute($enter_cmd | $_forgit_enter_pager)\"
--preview=\"$preview_cmd\"
--bind=\"alt-e:execute-silent($EDITOR \$\($get_files\) >/dev/tty </dev/tty)\"
--bind=\"alt-e:execute-silent($EDITOR \$\($get_files\) >/dev/tty </dev/tty)+refresh-preview\"
$FORGIT_DIFF_FZF_OPTS
--prompt=\"$commits > \"
"
@ -176,7 +176,7 @@ _forgit_add() {
$FORGIT_FZF_DEFAULT_OPTS
-0 -m --nth 2..,..
--preview=\"$preview\"
--bind=\"alt-e:execute-silent($EDITOR \$\(echo {} | $extract\) >/dev/tty </dev/tty)\"
--bind=\"alt-e:execute-silent($EDITOR \$\(echo {} | $extract\) >/dev/tty </dev/tty)+refresh-preview\"
$FORGIT_ADD_FZF_OPTS
"
files=$(git -c color.status=always -c status.relativePaths=true status -su |