You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
It's better to use the same editor both as editor and as viewer or pager (e.g. as replacement for less). To use ox as viewer, readonly mode must be supported.
Describe the solution you'd like
When ox is invoked as "rox", it should read content of file from stdin or from file, if specified, and display it in readonly mode.
Describe alternatives you've considered
Currently, less or vim are used as pager.
The text was updated successfully, but these errors were encountered:
This is an interesting idea, I do want to add a read only mode for files that aren't able to be written to due to permissions or other factors and will consider adding a way to use this from the command line interface. :)
I've added a read only mode that will open a text file and not allow any edits in 0.2.7 but I will further this feature to allow input from the stdin in later versions, probably the next one.
You can use the -r flag to open files as read only
Passing information from stdin can be done as follows (as an example):
tree | ox --stdin -r (to dump the output of the tree command into a readonly ox document)
or ox --stdin <<< "some string" (redirecting some string into ox via stdin)
Is your feature request related to a problem? Please describe.
It's better to use the same editor both as editor and as viewer or pager (e.g. as replacement for less). To use ox as viewer, readonly mode must be supported.
Describe the solution you'd like
When ox is invoked as "rox", it should read content of file from stdin or from file, if specified, and display it in readonly mode.
Describe alternatives you've considered
Currently, less or vim are used as pager.
The text was updated successfully, but these errors were encountered: