The current implementation downloads the raw prototype files from
github, then deserializes them into `ChannelPrototype` objects and
re-serializes them to the local config.
Because TOML can express same things in multiple ways, it isn't trivial
to have consistent TOML formatting results when re-serializing the
files.
I consider this to be a bug, which is why I'm now directly copying the
downloaded file content to the local config, while keeping a sanity
check by attempting to deserialize it along the way.
Add env channel
Add support to toggle between sources and reload them, this enables the
following
```toml
[source]
command = ["fd -t f", "fd -t f -H"]
[keybindings]
toggle_source = "ctrl-t"
reload_source = "ctrl-r"
```
now you can have the same channel with two different representations,
for example with and without hidden files
the change is backwards compatible, if you put a simple string nothing
changes
---------
Co-authored-by: alexandre pasmantier <alex.pasmant@gmail.com>
this pr adds the possibility of starting television from a different
directory and it gives the option of complete a partial match. For
example
```fish
cd ~/.config/<ctrl-t> # opens television at '~/.config/' with an empty search bar
cd ~/.config/fi<ctrl-t> # opens television at '~/.config/' with 'fi' in the search bar
```
solves (for zsh shell)
https://github.com/alexpasmantier/television/issues/438
BREAKING CHANGE: the format of the cable channel files and more
specifically the preview specification is updated to be a single table
named `preview` (with keys `command`, `delimiter`, and `offset`) instead
of three flat fields.
```toml
preview_command = "echo 3"
preview_delimiter = " "
preview_offset = "{1}"
```
becomes:
```toml
preview.command = "echo 3"
preview.delimiter = " "
preview.offset = "{1}"
```
Broke away the previewer logic into its own tokio task communicating
with the main thread over two mpsc channels.
Most of the previewer code is now much simpler and less verbose.
This brings quite a nice bump to performance and overall UI
responsiveness and also makes the previewer consume less cpu resources.
This drops the `TelevisionChannel` enum which served as a unified
interface for builtin and cable channels as well as all related macros
and the `television-derive` package.
This simplifies the code quite a lot and will improve overall
maintainability.
BREAKING CHANGE: No more builtin previews which means channels currently using `:files:` and other builtins will now need to rely on external tools (examples to come).
this pr adds the possibility of starting television from a different
directory and it gives the option of complete a partial match. For
example
```fish
cd ~/.config/<ctrl-t> # opens television at '~/.config/' with an empty search bar
cd ~/.config/fi<ctrl-t> # opens television at '~/.config/' with 'fi' in the search bar
```
solves (for fish shell)
https://github.com/alexpasmantier/television/issues/438