1
0
Fork 0

lf: bugfix

This commit is contained in:
Luca Bilke 2025-03-13 15:35:57 +01:00
parent 6035cdfbf1
commit 24dae48923
Signed by: luca
GPG key ID: F6E11C9BAA7C82F5
2 changed files with 4 additions and 4 deletions
common/.config/lf

View file

@ -184,9 +184,9 @@ cmd find_word ${{
--preview="$BAT"' --highlight-line {2} {1}'
)"
file="$(realpath "$(echo "$res" | cut -d':' -f1 | sed 's/\\/\\\\/g;s/"/\\"/g')" 2>/dev/null)"
row="$(echo "$res" | cut -d':' -f2)"
column="$(echo "$res" | cut -d':' -f3)"
file="$(realpath "$(printf "%s" "$res" | cut -d':' -f1 | sed 's/\\/\\\\/g;s/"/\\"/g')" 2>/dev/null)"
row="$(printf "%s" "$res" | cut -d':' -f2)"
column="$(printf "%s" "$res" | cut -d':' -f3)"
if [ -n "$res" ]; then
if [ "$EDITOR" = "nvim" ] || [ "$EDITOR" = "vim" ]; then

View file

@ -144,7 +144,7 @@ run() {
cat "$cache"
else
if out=$("$@"); then
printf "%s" "$out" | tee -p "$cache"
printf "%s" "$out" | tee "$cache"
else
printf "%s" "$out"
fi