- Broken symlink should display without error.
- Display the symlink destination.
- Fix deleting symlinks pointing to a directory.
Fixes: https://github.com/sayanarijit/xplr/issues/185
This works:
```lua
xplr.fn.custom.ping = function(app)
print("What's your name?")
local name = io.read()
os.execute('read -p "Hello ' .. name .. ', you are in ' .. app.pwd .. '"')
return {
{ LogSuccess = "pong" },
}
end
```
Then it can be called via `CallLua: custom.ping`.
Use `remaps: {key: null}` to un-map a key.
Also,
- `gx` will now open only the file under focus.
- `:sx` will open the selected files.
And other minor improvements.
Discussion: https://github.com/sayanarijit/xplr/discussions/146
Stay in the current mode when key input is not recognised. It's better
to do nothing than doing something wrong, at least when dealing with
important files and folders.
This PR targets 2 pain points.
1. The `Explore` message was async, which caused some unexpected
behavior. This was fixed by splitting `Explore` into `ExplorePwd`,
`ExplorePwdAsync` and `ExploreParentsAsync`. `ExploreParentsAsync`
is similar to the former `Explore`, which is mainly used when loading
`xplr` for the first time. However, what we'll be using frequently
are `ExplorePwd` and `ExplorePwdAsync` messages.
2. Files with spaces caused some unexpected behavior. This was fixed by
escaping the paths properly. This also fixed focusing of a file after
creating or renaming it.
Anothor breaking change is that `XPLR_PIPE_FOCUS_OUT` has been removed.
`XPLR_FOCUS_PATH` is all we need. So, the rule of thumb is if a variable
contains one liner value, it can be used directly from the env vars.
Variables that can contain multi-line values, will be exposed via the
pipes.
Minor changes are
- Add `switch_mode` mode to the global key binding help menu
- Moved some UI related code from config.rs to ui.rs.
- Fixed compilation issue on `rustc 1.50.0`.
Now, users can change the UI layout via the `SwitchLayout{Builtin|Custom}`
message, or by using key `ctrl-w`.
There are 3 default layout options -
- default
- no_help
- no_selection
- no_help_no_selection
Also, the initial mode and the initial layout can be specified in the
config.
Closes: https://github.com/sayanarijit/xplr/issues/107