From e232c8f37b4771a36adbd68285a0b65e0f58fe46 Mon Sep 17 00:00:00 2001 From: Julian Prein Date: Fri, 23 May 2025 15:58:18 +0200 Subject: [PATCH] zsh:glog: Use single quotes for file arguments Since they get interpreted by a shell again, weird file names (e.g. including dollar signs) would not be passed literally in double quotes. --- .config/zsh/autoload/git/glog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.config/zsh/autoload/git/glog b/.config/zsh/autoload/git/glog index 48cedeb..20b784d 100755 --- a/.config/zsh/autoload/git/glog +++ b/.config/zsh/autoload/git/glog @@ -59,13 +59,13 @@ read -r -d '' <` for 'patch' command with `-- ` 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 `-- ` & maybe `-W` # for preview) -fzf_preview[files_only]="$fzf_preview[patch] ${(@)${@:${@[(ei)--]}}/(#m)*/\"$MATCH\"}" +fzf_preview[files_only]="$fzf_preview[patch] ${(@)${@:${@[(ei)--]}}/(#m)*/'$MATCH'}" # Use git's pager in the preview window (and with it any special highlighting # tool, such as diff-so-fancy)