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

read-only mode #22

Closed
v217 opened this issue Apr 6, 2021 · 8 comments · Fixed by #238
Closed

read-only mode #22

v217 opened this issue Apr 6, 2021 · 8 comments · Fixed by #238

Comments

@v217
Copy link

v217 commented Apr 6, 2021

Hi,
Sorry couldn't find any docs on this.
Is there a way to disable write access to the filesystem.
I am looking for a file explorer to quickly span shells in different directories.

@sayanarijit
Copy link
Owner

You can actually remove all the keys that write to the filesystem from the config file.

@sayanarijit
Copy link
Owner

You might want to go through this doc https://github.com/sayanarijit/xplr/wiki/Key-Bindings

@v217
Copy link
Author

v217 commented Apr 7, 2021

OK, Thanks, but wouldn't an option "--read-only" be very useful.
Sometimes you want to manipulate files, and sometimes you want to browse fastly through a filesystem, without actually remembering all the shortcuts of xplr, resting assured that there is no danger of accidentally moving or deleting anything?

@sayanarijit
Copy link
Owner

Got it. That's a valid use case. I'll keep it in mind while implementing the CLI args.

sayanarijit added a commit that referenced this issue Apr 19, 2021
sayanarijit added a commit that referenced this issue Apr 19, 2021
@sayanarijit
Copy link
Owner

With #86 I have enabled read-only mode via config file. Now let's wait for the CLI args.

@v217
Copy link
Author

v217 commented Apr 19, 2021

That's awesome! xplr is the only filemanager I know with has this option. Thank you!

sayanarijit added a commit that referenced this issue Apr 19, 2021
Do not include non-read-only actions in the in read-only mode. i.e. do
not display non-read-only actions in help menu.

Ref: #22
sayanarijit added a commit that referenced this issue Apr 19, 2021
Do not include non-read-only actions in the in read-only mode. i.e. do
not display non-read-only actions in help menu.

Ref: #22
@sayanarijit
Copy link
Owner

FYI due to design restrictions, It will not be possible to for e.g. omit the "create file" option from the help menu. But the actual action to create the file will be omitted from the help menu.
Also, shell commands that perform read-only actions are also restricted in the read-only mode since there is no way to detect what they execute. e.g. the ? key action that executes less <help menu> will not be visible in the read-only mode.

@v217
Copy link
Author

v217 commented Apr 19, 2021

Good to know! Thanks!

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

Successfully merging a pull request may close this issue.

2 participants