lf icon indicating copy to clipboard operation
lf copied to clipboard

"a=d,d=A" after closing lf

Open ignamartinoli opened this issue 2 years ago • 5 comments

Sometimes, after closing lf or when I take input for deleting a file. I see printed on the terminal the line a=d,d=A.

I have no idea why.

This is my configuration file

set shell sh
set shellopts '-eu'
set ifs "\n"
set icons
set mouse

set scrolloff 10
set drawbox

set ignorecase true

set previewer ~/.config/lf/preview.sh
set cleaner ~/.config/lf/clean.sh

cmd rename %if [ -e "$1" ]; then printf "file exists"; else mv "$f" "$1"; fi

cmd extract ${{
	set -f
	case $f in
		*.tar.bz|*.tar.bz2|*.tbz|*.tbz2) tar xjvf "$f" ;;
		*.tar.gz|*.tgz) tar xzvf "$f" ;;
		*.tar.xz|*.txz) tar xJvf "$f" ;;
		*.zip) unzip "$f" ;;
		*.rar) unrar x "$f" ;;
		*.7z) 7z x "$f" ;;
	esac
}}

cmd tar ${{
	set -f
	mkdir "$1"
	cp -r "$fx" "$1"
	tar czf "$1.tar.gz" "$1"
	rm -rf "$1"
}}

cmd zip ${{
	set -f
	mkdir "$1"
	cp -r "$fx" "$1"
	zip -r "$1.zip" "$1"
	rm -rf "$1"
}}

map . set hidden!
map <enter> $~/.config/lf/open.sh $f
map a push $touch<space>
map r push $~/.config/lf/rename.sh<space>
map <backspace2> $~/.config/lf/delete.sh
map d $~/.config/lf/delete.sh
map <c-f> $~/.config/lf/fzf.sh

ignamartinoli avatar Apr 02 '23 17:04 ignamartinoli

a=d,d=A looks like part of a terminal escape sequence for the kitty graphics protocol. Presumably, a script you run when exiting lf is the cause of that.

slavistan avatar Apr 08 '23 07:04 slavistan

In theory, a=d is the icat command to delete images.

My clean.sh is

#!/bin/sh

kitten icat --clear --stdin no --silent --transfer-mode file < /dev/null > /dev/tty

and the last line of my previewer has a exit 1 to make sure it is exited.

I don't get why I should see an icat command in the terminal

ignamartinoli avatar Apr 14 '23 08:04 ignamartinoli

@ignamartinoli Same issue. Do you think if we should report this to kitty?

rockyzhang24 avatar May 05 '23 05:05 rockyzhang24

@rockyzhang24 I'm not sure if this is a Kitty or an lf issue.

It wouldn't hurt tho, could you please do it and mention this issue so that they get linked.

Maybe this way we can have a second opinion and see were this bug report should be worked on.

ignamartinoli avatar May 06 '23 02:05 ignamartinoli

@ignamartinoli Sure. I'll do that.

rockyzhang24 avatar May 06 '23 07:05 rockyzhang24