lf: bugfix
This commit is contained in:
parent
6035cdfbf1
commit
24dae48923
2 changed files with 4 additions and 4 deletions
|
@ -184,9 +184,9 @@ cmd find_word ${{
|
||||||
--preview="$BAT"' --highlight-line {2} {1}'
|
--preview="$BAT"' --highlight-line {2} {1}'
|
||||||
)"
|
)"
|
||||||
|
|
||||||
file="$(realpath "$(echo "$res" | cut -d':' -f1 | sed 's/\\/\\\\/g;s/"/\\"/g')" 2>/dev/null)"
|
file="$(realpath "$(printf "%s" "$res" | cut -d':' -f1 | sed 's/\\/\\\\/g;s/"/\\"/g')" 2>/dev/null)"
|
||||||
row="$(echo "$res" | cut -d':' -f2)"
|
row="$(printf "%s" "$res" | cut -d':' -f2)"
|
||||||
column="$(echo "$res" | cut -d':' -f3)"
|
column="$(printf "%s" "$res" | cut -d':' -f3)"
|
||||||
|
|
||||||
if [ -n "$res" ]; then
|
if [ -n "$res" ]; then
|
||||||
if [ "$EDITOR" = "nvim" ] || [ "$EDITOR" = "vim" ]; then
|
if [ "$EDITOR" = "nvim" ] || [ "$EDITOR" = "vim" ]; then
|
||||||
|
|
|
@ -144,7 +144,7 @@ run() {
|
||||||
cat "$cache"
|
cat "$cache"
|
||||||
else
|
else
|
||||||
if out=$("$@"); then
|
if out=$("$@"); then
|
||||||
printf "%s" "$out" | tee -p "$cache"
|
printf "%s" "$out" | tee "$cache"
|
||||||
else
|
else
|
||||||
printf "%s" "$out"
|
printf "%s" "$out"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue