Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exit Status 126 #1

Open
ewof opened this issue Jan 4, 2022 · 7 comments
Open

Exit Status 126 #1

ewof opened this issue Jan 4, 2022 · 7 comments

Comments

@ewof
Copy link

ewof commented Jan 4, 2022

With the 'x' to cd to directory on qutting i always get exit status 126 permission denied

@slavistan
Copy link
Owner

Hi @elwolf6. Please check once more that everything is installed as instructed. What's the output of this?

ls -la "$(command -v lf-previewer)"
ls -la "$(command -v lf-cleaner)"
ls -la "$(command -v lf-run)"

Let's first make sure the files are in $PATH and executable. Also, which interactive shell are you using? Bash? Zsh?

@ewof
Copy link
Author

ewof commented Jan 6, 2022

lf

@slavistan
Copy link
Owner

Looks alright. Lets check the remaining two: You did add this to your zshrc or your bashrc (you didn't tell me which shell you're using)?

lf () {
	LF_TEMPDIR="$(mktemp -d -t lf-tempdir-XXXXXX)"
	LF_TEMPDIR="$LF_TEMPDIR" lf-run -last-dir-path="$LF_TEMPDIR/lastdir" "$@"
	if [ "$(cat "$LF_TEMPDIR/cdtolastdir" 2>/dev/null)" = "1" ]; then
		cd "$(cat "$LF_TEMPDIR/lastdir")"
	fi
	rm -r "$LF_TEMPDIR"
	unset LF_TEMPDIR
}

... and you did add this to lf's configuration file ~/.config/lf/lfrc?

set previewer lf-previewer
set cleaner lf-cleaner

map x quitcd
cmd quitcd ${{
	echo "1" > "$LF_TEMPDIR"/cdtolastdir
	lf -remote "send $id quit"
}}

@ewof
Copy link
Author

ewof commented Jan 11, 2022

Yea I have all of those, am using zsh, the x key works the image previews work it just gives me a no permission error

@slavistan
Copy link
Owner

Hi @elwolf6 - pardon the late reply. Let's summarize our current data:

  • image previews do work
  • the 'x' hotkey does quit lf, but it does not change your working directory and instead yields a "permission denied" error
  • this problem persists everywhere, whether you're trying it in /usr/bin or in, let's say ~/.local/bin
  • you're using zsh and everything seems to be installed and set up as instructed

Is this correct?

@ewof
Copy link
Author

ewof commented Jan 26, 2022

Yea

@slavistan
Copy link
Owner

You'd then have to have a look inside the temporary directory created by your lf () { ... } shell function (by using a fixed temporary directory - and don't forget to comment out the rm ... command deleting the temporary directory after you quit lf). A file will be created there, lastdir, which contains the directory to change to. See if the directory (1) is correct and (2) can be accessed by you.

I suspect it's something else, but that's something to try anyway. If you have another linux setup do try it out there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants