Revert debug changes

Signed-off-by: Wenxuan Zhang <wenxuangm@gmail.com>
This commit is contained in:
Wenxuan Zhang 2023-06-17 21:29:25 +08:00
parent 9014a973e7
commit f8e4bb1921
No known key found for this signature in database
GPG key ID: CCAF35548C65530F

View file

@ -164,7 +164,10 @@ _forgit_add() {
untracked=$(git config --get-color color.status.untracked red)
# NOTE: paths listed by 'git status -su' mixed with quoted and unquoted style
# remove indicators | remove original path for rename case | remove surrounding quotes
extract="sed 's/^.*] //' | sed 's/.* -> //' | sed -e 's/^\\\"//' -e 's/\\\"\$//'"
extract="
sed 's/^.*] //' |
sed 's/.* -> //' |
sed -e 's/^\\\"//' -e 's/\\\"\$//'"
preview="
file=\$(echo {} | $extract)
if (git status -s -- \\\"\$file\\\" | grep '^??') &>/dev/null; then # diff with /dev/null for untracked files