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

Setting a custom "root" directory #1679

Open
rizo opened this issue Apr 5, 2024 · 1 comment
Open

Setting a custom "root" directory #1679

rizo opened this issue Apr 5, 2024 · 1 comment

Comments

@rizo
Copy link

rizo commented Apr 5, 2024

Hi! Have been using lf (thanks for implementing the tool!) and one thing I normally do, is open lf in a terminal when working on a particular project/repo. I would like to be able to prevent lf from navigating into parent directories, effectively setting the root to ./.

Is this currently possible? I scanned the docs but couldn't find anything.

Maybe having an extra command line option like -root string would be one way to achieve this.

If this sounds useful, with some guidance, I could try to implement this myself.
Thanks in advance.

@gokcehan
Copy link
Owner

gokcehan commented Apr 7, 2024

@rizo Maybe there is a tool like chroot that can achieve what you want without support from our side. There are some tools mentioned in chroot arch wiki page, so maybe they are worth a try.

Other than that, maybe it is possible to override the default updir command to prevent going further than OLDPWD.

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