4 ms·
found out that this has problems when file name has underscore (_) Better use some long rare string as place holder for xargs gblame2 () { local file=$(f
by overtomanu 3y ago
found out that this has problems when file name has underscore (_)
Better use some long rare string as place holder for xargs
gblame2 () {
local file=$(fzf)
cat "$file" | awk '{printf("%5d %s\n", NR, $0)}' | fzf --layout reverse --preview-window up --preview "echo {} | awk '{print \$1}' | xargs -I __XZY__ sh -c \"git log --color -L__XZY__,'+1:${file}'\""
}