* Improve windows shell handling
* Add shell in command line
* Fix shellopts bug
* Add quote string
* Refactor `exportFiles` function
* Add defaults for Windows
* Revert "Add defaults for Windows"
Accidental commit
This reverts commit 5ff32650fe.
* Separate handling for CMD vs PowerShell
* Add case insensitive check
* Add support for displaying lf options in the ruler
* Print escape character as plain text
* Document user defined options
* Change escape rules
* Use reflect instead of environment table
* Factor out common option map logic
* Improve error message slightly
* Display blank option values
* Export a `$lf` environment variable with path to lf binary
If Go fails to find a path to the lf binary, `$lf` is set to the string `lf` so
that running `$lf` in scripts gives a reasonable error message.
* Make the `:doc` command work even if lf is not in the PATH
Previously, `:doc` executed `lf -doc`. Now, it executed `$lf -doc` or `%lf%
-doc`.
Before this change, `:doc` did not work if `lf` is not in the PATH. This is
likely to happen to new users who are trying out `lf` and need docs the most.
Moreover, if you made some changes to the docs and ran `lf` with `go run .`,
`:doc` would return the docs for the version of `lf` in the PATH instead of
what is expected.
* always export lf_options before previewing
related functions were moved to `os.go`
and now exportOpts isn't called through
an app, so it can be called independently
* move related functions to main.go
so they get compiled on windows too
now lf will start the server in the current directory (which will then
Chdir to the user's home directory) to ensure it is always starting as
the user intended.
Fix colour construction issue
This also has a test to mitigate it in the future
Remove `colormode` option
The original issue it was trying to solve is no longer present with
tcell (it being a holdover from `color256` on termbox) so it is not
needed.
retire gitter channel in favor of irc/matrix
Export options as environment variables (#448)
* Export options as environment variables
Any options from gOpts are available via lf_OPTION environment
variables. For now it works only on booleans, integers and strings (no
array support)
* Do not export some of the options
* Add support for arrays and fix numbers
* Fix comments
* Replace 1 and 0 with true and false
* Export hidden,reverse,dirfirst and sortby options
* Fix comments
* Little fix
* Simplify boolean conversion
log readlink errors instead of fail
Related #447 and #374